Browse Source

Tried the function way

Florian DORMONT 11 years ago
parent
commit
7f50f9cdcf
3 changed files with 9 additions and 7 deletions
  1. 2 2
      FXSH_Build.bat
  2. 5 1
      MonochromeLib.c
  3. 2 4
      MonochromeLib.h

+ 2 - 2
FXSH_Build.bat

@@ -6,11 +6,11 @@ if exist SHEXAGON.G1A  del SHEXAGON.G1A
 
 cd debug
 if exist FXADDINror.bin  del FXADDINror.bin
-"C:\CASIO\fx-9860G_SDK\OS\SH\Bin\Hmake.exe" Addin.mak
+"C:\CASIO\fx-9860G SDK\OS\SH\Bin\Hmake.exe" Addin.mak
 cd ..
 if not exist debug\FXADDINror.bin  goto error
 
-"C:\CASIO\fx-9860G_SDK\Tools\MakeAddinHeader363.exe" "C:\users\eiyeron\My Documents\Programming\Casio\Super-Hexagon-Casio"
+"C:\CASIO\fx-9860G SDK\Tools\MakeAddinHeader363.exe" "C:\users\eiyeron\My Documents\Programming\SDK\fxsdk\Super-Hexagon-Casio"
 if not exist SHEXAGON.G1A  goto error
 echo Build has completed.
 goto end

+ 5 - 1
MonochromeLib.c

@@ -115,7 +115,11 @@
 #define sgn(x)	(x<0?-1:1)
 #define rnd(x)	((int)(x+0.5))
 
-const unsigned int sc0135[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x0135 };
+const static unsigned int sc0135[] = { 0xD201D002, 0x422B0009, 0x80010070, 0x0135 };
+typedef char*(*sc_cpv)(void);
+char* ML_vram_adress() {
+	return (*(sc_cpv)sc0135)();
+}
 
 
 #ifdef ML_CLEAR_VRAM

+ 2 - 4
MonochromeLib.h

@@ -88,10 +88,8 @@ extern "C" {
 typedef enum {TRANSPARENT=-1, WHITE, BLACK, XOR, CHECKER} ML_Color;
 
 
-typedef char*(*sc_cpv)(void);
-extern const unsigned int sc0135[];
-#define ML_vram_adress (*(sc_cpv)sc0135)
-
+//#define ML_vram_adress (*(sc_cpv)sc0135)
+char* ML_cram_adress();
 void ML_clear_vram();
 void ML_clear_screen();
 void ML_display_vram();