This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "random" (func $random (result f32))) | |
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
;; Color: u32 ; ABGR | |
;; Cell2: u8*2 ; left/up cell, right/down cell | |
;; Wall: f32*5 ; (x1,y1) -> (x2, y2), and x-scale | |
;; [0x0000, 0x0100) u8[12*12] maze cells for Kruskal's algo | |
;; [0x0100, 0x0310) Cell2[12*11*2] walls for Kruskal's algo | |
;; [0x0400, 0x0500) u8[32*32] RLE compressed 2bpp textures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "random" (func $random (result f32))) | |
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
(memory (export "mem") 6) | |
(data (i32.const 0x1000) | |
;; top wall | |
"\00\00\00\00" ;; 0.0 | |
"\00\00\00\00" ;; 0.0 | |
"\00\00\c0\41" ;; 24.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
(memory (export "mem") 6) | |
(data (i32.const 0) | |
;; top wall | |
"\00\00\40\c1" ;; -12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
(memory (export "mem") 6) | |
(data (i32.const 0) | |
;; top wall | |
"\00\00\40\c1" ;; -12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
(memory (export "mem") 6) | |
(data (i32.const 0) | |
;; top wall | |
"\00\00\40\c1" ;; -12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import "Math" "sin" (func $sin (param f32) (result f32))) | |
(memory (export "mem") 6) | |
(data (i32.const 0) | |
;; top wall | |
"\00\00\40\c1" ;; -12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 | |
"\00\00\40\41" ;; +12.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype HTML> | |
<script src="test.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/GrahamBoy/opcode.cpp b/GrahamBoy/opcode.cpp | |
index a64634c..2bc7778 100644 | |
--- a/GrahamBoy/opcode.cpp | |
+++ b/GrahamBoy/opcode.cpp | |
@@ -4,6 +4,182 @@ | |
#include <stdio.h> | |
#include <iostream> | |
+#include <stdint.h> | |
+#include <assert.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00: nop | |
02: ld [bc],a | |
04: inc b | |
06: ld b,XX | |
0a: ld a,[bc] | |
0c: inc c | |
0e: ld c,XX | |
12: ld [de],a | |
14: inc d | |
16: ld d,XX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <math.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#define GL_GLEXT_PROTOTYPES |