From: sparky4 Date: Thu, 5 Nov 2015 21:51:35 +0000 (-0600) Subject: OK IT COMPILES! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=f084f970ed1e8f06dfffd67bd924918a18a9ce50;p=16.git OK IT COMPILES! --- diff --git a/16.exe b/16.exe index f126476b..34b67ab5 100755 Binary files a/16.exe and b/16.exe differ diff --git a/bakapi.exe b/bakapi.exe index 8bc8d336..0c3cdab9 100755 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 4e30ad35..abc81244 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fmemtest.exe b/fmemtest.exe index 5b900e67..0129d453 100755 Binary files a/fmemtest.exe and b/fmemtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index ebcea9a2..4efeb74b 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttest.exe b/fonttest.exe index f92b49a3..cc97491c 100755 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/inputest.exe b/inputest.exe index 57ffb9f2..64acc519 100755 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/makefile b/makefile index f0db071a..7135b965 100755 --- a/makefile +++ b/makefile @@ -72,7 +72,7 @@ DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ) 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) timer.$(OBJ) # #3812intf.$(OBJ) -GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) planar16.$(OBJ) +GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe # tsthimem.exe @@ -278,11 +278,11 @@ modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c wcl $(FLAGS) -c $(SRCLIB)bakapee.c -16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c $(MODEXLIB)planar16.h +16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c wcl $(FLAGS) -c $(MODEXLIB)16render.c -planar16.$(OBJ): $(MODEXLIB)planar16.h $(MODEXLIB)planar16.c - wcl $(FLAGS) -c $(MODEXLIB)planar16.c +16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c + wcl $(FLAGS) -c $(MODEXLIB)16planar.c bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c wcl $(FLAGS) -c $(SRCLIB)bitmap.c diff --git a/maptest.exe b/maptest.exe index cb781a89..9908b0be 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index 22bbb34a..2363132c 100755 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/palettel.exe b/palettel.exe index 125e58f2..1885f391 100755 Binary files a/palettel.exe and b/palettel.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index ce969505..5a3991f1 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/pcxtest2.exe b/pcxtest2.exe index c5a32e5a..d704d6fc 100755 Binary files a/pcxtest2.exe and b/pcxtest2.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 272ea486..c39db0bb 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 7bb9e806..1d2ed371 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/16.h b/src/16.h index 7b2f9811..754184b1 100755 --- a/src/16.h +++ b/src/16.h @@ -33,7 +33,8 @@ typedef enum { ENGI_EXIT, ENGI_QUIT, ENGI_RUN, - ENGI_INPUT + ENGI_INPUT, + ENGI_PAUSE } engi_stat_t; #endif /*__16_H_*/ diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 19af31f5..ae750383 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -24,7 +24,6 @@ #include #include #include "src/lib/bitmap.h" -#include "src/lib/modex16.h" #ifndef PCXHEADER_H #define PCXHEADER_H @@ -49,7 +48,6 @@ static struct pcxHeader { } head; #endif /*PCXHEADER_H*/ - static void loadPcxStage1(FILE *file, bitmap_t *result) { long bufSize; int index; diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 4b31c4b4..fd112658 100755 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -25,27 +25,8 @@ #ifndef BITMAP_H #define BITMAP_H -#include "src/lib/types.h" -#include "src/lib/16_head.h" -#define PALSIZE 768 - -typedef struct { - byte huge *data; - word width; - word height; - byte *palette; - word offset; -// byte far *font; -} bitmap_t; - -typedef struct { - byte **data; - word ntiles; /* the number of tiles */ - word twidth; /* width of the tiles */ - word theight; /* height of the tiles */ - byte *palette; /* palette for the tile set */ -} tileset_t; +#include "src/lib/modex16.h" bitmap_t bitmapLoadPcx(char *filename); tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight); diff --git a/src/lib/modex16.h b/src/lib/modex16.h index cbd2ba6f..b5ca74b1 100755 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -30,7 +30,7 @@ #include "src/lib/16_head.h" #include "src/lib/bitmap.h" #include "src/lib/planar.h" -#include "src/lib/modex16/planar16.h" +#include "src/lib/modex16/16planar.h" #include "src/lib/16text.h" #include "src/lib/modex16/16render.h" #include "src/lib/modex16/320x240.h" @@ -50,6 +50,7 @@ #define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2)) #define PLANE(x) (1<< (x&3)) #define SELECT_ALL_PLANES() outpw(0x03c4, 0xff02) +#define PALSIZE 768 typedef union { diff --git a/src/lib/modex16/planar16.c b/src/lib/modex16/16planar.c similarity index 95% rename from src/lib/modex16/planar16.c rename to src/lib/modex16/16planar.c index 89e164fa..4c5c2578 100755 --- a/src/lib/modex16/planar16.c +++ b/src/lib/modex16/16planar.c @@ -23,7 +23,7 @@ #include #include #include -#include "src/lib/modex16/planar16.h" +#include "src/lib/modex16/16planar.h" #ifndef PCXHEADER_H #define PCXHEADER_H diff --git a/src/lib/modex16/planar16.h b/src/lib/modex16/16planar.h similarity index 95% rename from src/lib/modex16/planar16.h rename to src/lib/modex16/16planar.h index b412fd9b..bd47e088 100755 --- a/src/lib/modex16/planar16.h +++ b/src/lib/modex16/16planar.h @@ -28,9 +28,9 @@ #ifndef PLANW_H #define PLANW_H -#include "src/lib/planar.h" #include "src/lib/modex16.h" planar_buf_t planarLoadPcx(char *filename); tileset_t planarLoadPcxTiles(char *filename, word twidth, word theight); + #endif diff --git a/src/lib/planar.c b/src/lib/planar.c index 52055cf4..38e4eb7b 100755 --- a/src/lib/planar.c +++ b/src/lib/planar.c @@ -28,8 +28,6 @@ #include "src/lib/planar.h" -extern byte *modexNewPal(); - /* creates a planar buffer from the bitmap data. The planar buffer is dynamically allocated, and should be destroyed with the planar_buf_free function when no longer diff --git a/src/lib/planar.h b/src/lib/planar.h index 09f07c69..821f4763 100755 --- a/src/lib/planar.h +++ b/src/lib/planar.h @@ -26,18 +26,9 @@ #ifndef PLANAR_H #define PLANAR_H -#include "src/lib/types.h" -#include "src/lib/16_head.h" -#include "src/lib/bitmap.h" -//#include "src/lib/modex16.h" +#include "src/lib/modex16.h" -typedef struct { - byte huge *plane[4]; /* 4 planes of image data */ - word width; /* width of the image (spread across 4 planes) */ - word height; /* height of the image (spread across 4 planes) */ - word pwidth; /* the number of bytes in each plane */ - byte *palette; -} planar_buf_t; +extern byte *modexNewPal(); /* creates a planar buffer from the bitmap data. The planar buffer is dynamically allocated, and should diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 3f53cd7f..2e1cd488 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -39,6 +39,30 @@ /* * typedefs of the game variables! */ +typedef struct { + byte huge *data; + word width; + word height; + byte *palette; + word offset; +} bitmap_t; + +typedef struct { + byte **data; + word ntiles; /* the number of tiles */ + word twidth; /* width of the tiles */ + word theight; /* height of the tiles */ + byte *palette; /* palette for the tile set */ +} tileset_t; + +typedef struct { + byte huge *plane[4]; /* 4 planes of image data */ + word width; /* width of the image (spread across 4 planes) */ + word height; /* height of the image (spread across 4 planes) */ + word pwidth; /* the number of bytes in each plane */ + byte *palette; +} planar_buf_t; + typedef struct { word id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ diff --git a/src/planrpcx.c b/src/planrpcx.c index 7a703c26..11d8d5dd 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -24,7 +24,6 @@ #include #include #include "src/lib/modex16.h" -#include "src/lib/modex16/planar16.h" global_game_variables_t gvar; planar_buf_t huge p, ptmp; diff --git a/test.exe b/test.exe index 5f242a76..f0c5f918 100755 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 527a1589..3fb7194c 100755 Binary files a/test2.exe and b/test2.exe differ diff --git a/vgmtest.exe b/vgmtest.exe index b63d956e..3b870111 100755 Binary files a/vgmtest.exe and b/vgmtest.exe differ