]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_tdef.h
__seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd...
[16.git] / src / lib / 16_tdef.h
index dbda778a0b9fa4f49dbd188377d5be301c08ba75..be166c7e4fb77aaf3845b51355febf10faa7d8dc 100755 (executable)
@@ -189,6 +189,30 @@ typedef struct {
 \r
 //from 16_in\r
 //==========================================================================\r
+#define        KeyInt          9       // The keyboard ISR number\r
+\r
+//\r
+// mouse constants\r
+//\r
+#define        MReset          0\r
+#define        MButtons        3\r
+#define        MDelta          11\r
+\r
+#define        MouseInt        0x33\r
+//#define      Mouse(x)        _AX = x,geninterrupt(MouseInt)\r
+\r
+//\r
+// joystick constants\r
+//\r
+#define        JoyScaleMax             32768\r
+#define        JoyScaleShift   8\r
+#define        MaxJoyValue             5000\r
+\r
+#define        MaxPlayers      4\r
+#define        MaxKbds         2\r
+#define        MaxJoys         2\r
+#define        NumCodes        128\r
+\r
 typedef        byte            ScanCode;\r
 \r
 typedef        enum            {\r
@@ -204,12 +228,10 @@ typedef   enum            {
                                                motion_None = 0,\r
                                                motion_Right = 1,motion_Down = 1\r
                                        } Motion;\r
-typedef        enum            {\r
-                                               dir_North,//dir_NorthEast,\r
-                                               dir_West,//dir_Nortinest,\r
-                                               dir_None,\r
-                                               dir_East,//,dir_SouthEast,\r
-                                               dir_South,//dir_Soutinest,\r
+typedef        enum            {               // Quick lookup for total direction\r
+                                               /*dir_NorthWest,        */dir_North,/*  dir_NorthEast,*/\r
+                                               dir_West,               dir_None,       dir_East,\r
+                                               /*dir_SouthWest,        */dir_South/*,  dir_SouthEast*/\r
                                        } Direction;\r
 typedef        struct          {\r
                                                boolean near    button0,button1,button2,button3;\r
@@ -239,6 +261,33 @@ typedef    struct          {
                                                                        joyMultXH,joyMultYH;\r
                                        } JoystickDef;\r
 \r
+typedef struct// instat\r
+{\r
+       boolean         IN_Started;\r
+       boolean         CapsLock;\r
+       ScanCode        CurCode,LastCode;\r
+} in_status_t;\r
+\r
+typedef struct// inconfig\r
+{\r
+       in_status_t instat;\r
+//\r
+// configuration variables\r
+//\r
+       boolean         Keyboard[NumCodes],\r
+                                       JoysPresent[MaxJoys],\r
+                                       MousePresent,\r
+                                       JoyPadPresent;\r
+\r
+//     Global variables\r
+       boolean         Paused;\r
+       char            LastASCII;\r
+       ScanCode        LastScan;\r
+\r
+       KeyboardDef     KbdDefs[MaxKbds];\r
+       JoystickDef     JoyDefs[MaxJoys];\r
+} in_info_t;\r
+\r
 //==========================================================================\r
 \r
 typedef        struct\r
@@ -538,6 +587,9 @@ typedef struct      //TODO: USE THIS!!!!
        byte            far             grneeded[NUMCHUNKS];\r
        memptr/*byte _seg*/     *audiosegs[NUMSNDCHUNKS];\r
 \r
+       long            _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+       long            _seg *audiostarts;      // array of offsets in audio / audiot\r
+\r
        //misc memptr\r
        memptr tinf[4];\r
 \r
@@ -563,9 +615,12 @@ typedef struct
        video_t video;  // video settings variable\r
        ca_t            ca;     // ca stuff\r
        pm_t            pm;     // pm stuff\r
-       loghandle_t handle;     //handles for file logging\r
-       kurokku_t kurokku;      //clock struct\r
-       mminfo_t mm; mminfotype mmi;\r
+       loghandle_t     handle; //handles for file logging\r
+       kurokku_t       kurokku;        //clock struct\r
+       mminfo_t        mm; mminfotype  mmi;    // mm stuff\r
+//++++ in_info_t       in;             // 16_in info\r
+       player_t        player[MaxPlayers];     // player vars\r
+//==== word far*       clockw;         /* 18.2hz clock */\r
 } global_game_variables_t;\r
 \r
 #ifdef __WATCOMC__\r