OSDN Git Service

no idea how to get joy buttons 2 and 3 to function.
[proj16/16.git] / src / pcxtest2.c
index f92c300..9052546 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ * Copyright (C) 2012-2021 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -27,7 +27,6 @@
 #include "src/lib/bitmap.h"\r
 //----#include "src/lib/planar.h"\r
 \r
-global_game_variables_t gvar;\r
 static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
 \r
 /*\r
@@ -56,6 +55,7 @@ DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite)
 */\r
 \r
 void main() {\r
+       static global_game_variables_t gvar;\r
        bitmap_t bmp;\r
 //---- planar_buf_t *p;\r
        int i;\r
@@ -85,7 +85,7 @@ void main() {
        }\r
 \r
 //0000 bmp = bitmapLoadPcx("data/koishi~~.pcx");\r
-       bmp = bitmapLoadPcx("data/chikyuu.pcx");\r
+       bmp = bitmapLoadPcx("data/chikyuu.pcx", &gvar);\r
 //     bmp = bitmapLoadPcx("data/koishi^^.pcx");\r
 //     bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx");\r
 //---- p = planar_buf_from_bitmap(&bmp);\r
@@ -95,7 +95,7 @@ void main() {
        gvar.video.page[0].sh+=32;\r
 \r
        /* fix up the palette and everything */\r
-       modexPalUpdate1(bmp.palette);\r
+       modexPalUpdate(bmp.palette);\r
 \r
        /* clear and draw one sprite and one bitmap */\r
        modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1);\r