OSDN Git Service

corepal variable added and i need to find out how to get the joystick input correct...
authorsparky4 <sparky4@cock.li>
Wed, 25 Oct 2017 20:16:40 +0000 (15:16 -0500)
committersparky4 <sparky4@cock.li>
Wed, 25 Oct 2017 20:16:40 +0000 (15:16 -0500)
makefile
src/inputest.c
src/lib/16_vl.c
src/lib/16_vl.h
src/lib/doslib
src/lib/gamepal.c
src/xcroll.c

index b0bd598..bc228a0 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -269,7 +269,7 @@ testexec: $(EXEC) $(TESTEXEC2)
 # game and bakapi executables
 #
 16.exe:                16.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
-bakapi.exe:            bakapi.$(OBJ) 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) $(DOSLIB) 16_wcpu.$(OBJ)# gfx.lib
+bakapi.exe:            bakapi.$(OBJ) 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) $(DOSLIB) 16_wcpu.$(OBJ) gamepal.$(OBJ)# gfx.lib
 sp2.exe:               sp2.$(OBJ)
 
 #
index e74d10c..efba746 100755 (executable)
@@ -25,8 +25,8 @@
 #include "src/lib/16_in.h"\r
 #include "src/lib/16_tail.h"\r
 \r
-//#define INPUTEST_JOYSTICKPADTEST\r
-#define INPUTEST_MOUSETEST\r
+#define INPUTEST_JOYSTICKPADTEST\r
+//#define INPUTEST_MOUSETEST\r
 \r
 void\r
 main(int argc, char *argv[])\r
index ac00102..a9d4b66 100755 (executable)
@@ -45,7 +45,8 @@ void  VL_Startup (global_game_variables_t *gvar)
        __asm   cld;\r
 \r
        VGAmodeX(1/*TODO other modes*/, 1, gvar);\r
-       VL_LoadPalFileCore(gvar->video.palette, gvar);\r
+//--   VL_LoadPalFileCore(gvar->video.palette, gvar);\r
+       VL_SetCorePal(gvar);\r
        //Quit ("Improper video card!  If you really have a VGA card that I am not\ndetecting it!", gvar);\r
 }\r
 \r
@@ -939,6 +940,21 @@ void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, word
        }\r
 }\r
 \r
+//++++//\r
+void VL_SetCorePal(global_game_variables_t *gvar)\r
+{\r
+       byte *palette = &corepal;\r
+       word i;\r
+\r
+       vga_palette_lseek(0);\r
+       for (i=0;i < COREPALSIZE;i++)\r
+               vga_palette_write(palette[(i*3)+0]>>2,\r
+                                                 palette[(i*3)+1]>>2,\r
+                                                 palette[(i*3)+2]>>2);\r
+\r
+       VL_PaletteSync(gvar);\r
+}\r
+\r
 void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar)\r
 {\r
        VLL_LoadPalFilewithoffset(filename, palette,\r
index 098eed8..30231f4 100755 (executable)
@@ -69,6 +69,7 @@ typedef union
 /* -======================= Constants & Vars ==========================- */\r
 extern byte far*  VGA;  /* The VGA Memory */\r
 extern byte far gamepal;\r
+extern byte far corepal;       //core palette used universally\r
 #define SCREEN_SEG             0xa000\r
 #define VIDEO_INT              0x10\r
 #define SET_MODE               0x00\r
@@ -207,6 +208,7 @@ void modexPalSave(byte *palette);
 void modexLoadPalFile(char *filename, byte *palette);\r
 void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar);\r
 void VL_LoadPalFileCore(byte *palette, global_game_variables_t *gvar);\r
+void VL_SetCorePal(global_game_variables_t *gvar);\r
 //void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, global_game_variables_t *gvar);\r
 void VL_UpdatePaletteWrite(byte *palette, word o, word palsize, global_game_variables_t *gvar);\r
 void VL_PaletteSync(global_game_variables_t *gvar);\r
index 1921c95..3801d6b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1921c95c26a77c368197a8e402aab9d50d2df38e
+Subproject commit 3801d6b6128ef21c0fdbbdd407dd6ff818b0c1c7
index f9f8caa..7edffc0 100755 (executable)
@@ -53,3 +53,15 @@ unsigned char __far gamepal[768]={
  46, 58, 58, 39, 55, 55, 29, 50, 50, 18, 48, 48,  8, 45, 45,  8,\r
  44, 44,  0, 41, 41,  0, 38, 38,  0, 35, 35,  0, 33, 33,  0, 31,\r
  31,  0, 30, 30,  0, 29, 29,  0, 28, 28,  0, 27, 27, 38,  0, 34};\r
+\r
+const unsigned char __far corepal[27]={\r
+ 1,  1,  1,    //overscan color not pure black\r
+63,  0,  0,    //red\r
+ 0,  0, 63,    //blue\r
+ 0, 63,  0,    //green\r
+63, 63,  0,    //yellow\r
+63, 63, 63,    //white\r
+63,  0, 63,    //magenta\r
+ 0, 63, 63,    //cyan\r
+ 0,  0,  0,    //pure black\r
+};\r
index 0c428ba..cbbabea 100755 (executable)
@@ -28,7 +28,7 @@
 \r
 //#define NOMAPLOAD\r
 //#define OLDPLAYERSPRITESTUFF\r
-#define XC_CTRLTYPE ctrl_Mouse//Keyboard\r
+#define XC_CTRLTYPE ctrl_Joystick1//ctrl_Mouse//ctrl_Keyboard\r
 //Mouse\r
 #ifdef __DEBUG__\r
 #define SCROLLEXEDEBUG\r