]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_in.h
pdir printf(%c%d %c%d %c%d %c%dn, dirchar(0), inpu.Keyboard[def->up], dirchar(4)...
[16.git] / src / lib / 16_in.h
old mode 100644 (file)
new mode 100755 (executable)
index daa864c..760b5bb
 \r
 #include <string.h>\r
 #include "src/lib/16_head.h"\r
+#include "src/lib/timer.h"\r
+#include "src/lib/bitmap.h"\r
+#include "src/lib/planar.h"\r
 \r
 #ifdef __DEBUG__\r
-#define        __DEBUG_InputMgr__\r
+//#define      __DEBUG_InputMgr__\r
 #endif\r
 \r
 #ifdef __DEBUG_InputMgr__\r
-#define TESTKEYIN\r
+//#define TESTKEYIN\r
 //#define TESTCONTROLNOISY\r
 #endif\r
 \r
+extern byte testkeyin,testcontrolnoisy;\r
+\r
+//if else for gfxtesting and direction\r
+//player[pn].d == 2 ||\r
+//player[pn].d != 2 ||\r
+#define DIRECTIONIFELSEGFXTEST (player[pn].info.dir == 2)\r
+#define NDIRECTIONIFELSEGFXTEST        (player[pn].info.dir != 2)\r
+\r
 #define        KeyInt  9       // The keyboard ISR number\r
 \r
 // Stuff for the joystick\r
@@ -174,14 +185,14 @@ typedef   enum            {
                                                dir_South,//dir_Soutinest,\r
                                        } Direction;\r
 typedef        struct          {\r
-                                               boolean         button0,button1,button2,button3;\r
-                                               int                     x,y;\r
-                                               Motion          xaxis,yaxis;\r
-                                               Direction       dir;\r
+                                               boolean near    button0,button1,button2,button3;\r
+                                               int     near            x,y;\r
+                                               Motion  near    xaxis,yaxis;\r
+                                               Direction near  dir;\r
                                        } CursorInfo;\r
 \r
 typedef        struct          {\r
-                                               ScanCode        button0,button1,\r
+                                               ScanCode near   button0,button1,\r
                                                                        //upleft,\r
                                                                        up,\r
                                                                        down,\r
@@ -193,7 +204,7 @@ typedef     struct          {
                                                                        ;\r
                                        } KeyboardDef;\r
 typedef        struct          {\r
-                                               word            joyMinX,joyMinY,\r
+                                               word    near    joyMinX,joyMinY,\r
                                                                        threshMinX,threshMinY,\r
                                                                        threshMaxX,threshMaxY,\r
                                                                        joyMaxX,joyMaxY,\r
@@ -213,12 +224,18 @@ typedef   struct
        int ty; //player tile position on the viewable map\r
        int triggerx; //player's trigger box tile position on the viewable map\r
        int triggery; //player's trigger box tile position on the viewable map\r
-       int setx; //NOT USED YET! player sprite sheet set on the image x\r
-       int sety; //NOT USED YET! player sprite sheet set on the image y\r
-       word q; //loop variable\r
-//     word d; //direction\r
-       //bitmap_t data; //supposively the sprite sheet data\r
-       int hp; //hitpoints of the player\r
+       int sheetsetx; //NOT USED YET! player sprite sheet set on the image x\r
+       int sheetsety; //NOT USED YET! player sprite sheet set on the image y\r
+       byte d;         //direction to render sprite!! wwww\r
+       byte q;         //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
+       byte near pdir; //previous direction~\r
+       word speed;             //player speed!\r
+//0000 planar_buf_t huge *data; //supposively the sprite sheet data\r
+//     planar_buf_t data; //supposively the sprite sheet data\r
+////0000----\r
+       bitmap_t huge *data; //supposively the sprite sheet data\r
+       sword hp; //hitpoints of the player\r
+       int persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
        CursorInfo      info;\r
        ControlType     Controls;\r
 } player_t;\r
@@ -251,8 +268,6 @@ typedef     struct
                static word             DemoOffset,DemoSize;\r
 #endif\r
 \r
-extern dword /*far**/ clockdw;\r
-\r
 //     Internal routines\r
 extern void interrupt INL_KeyService();\r
 extern void Mouse(int x);\r
@@ -277,8 +292,8 @@ extern void IN_SetKeyHook(void (*hook)());
 extern void IN_ClearKeysDown();\r
 //static void INL_AdjustCursor(CursorInfo *info,word buttons,int dx,int dy);\r
 extern void IN_ReadCursor(CursorInfo *info);\r
-extern void IN_ReadControl(int playnum,player_t *player);\r
-extern void IN_SetControlType(word playnum,player_t *player,ControlType type);\r
+extern void near IN_ReadControl(int pn,player_t *player);\r
+extern void IN_SetControlType(word pn,player_t *player,ControlType type);\r
 #if DEMO0\r
 extern boolean IN_StartDemoRecord(word bufsize);\r
 extern void IN_StartDemoPlayback(byte /*__segment*/ *buffer,word bufsize);\r