]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_tdef.h
====----==== this is a messed up build that contains a busted 0.exe pan page system
[16.git] / src / lib / 16_tdef.h
index 206598c412c7b116bf1fc2fe3ee2857280e10992..9a225c8fb23b8a525c1bdb0230c802ac563e9b73 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-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -119,6 +119,29 @@ typedef struct {
        sword delta;                    // How much should we shift the page for smooth scrolling\r
 } page_t;\r
 \r
+//from 16_sprit.h\r
+#ifdef __WATCOMC__\r
+typedef struct sprite\r
+{\r
+       // VRS container from which we will extract animation and image data\r
+       struct vrs_container *spritesheet;\r
+       // Container for a vrl sprite\r
+       struct vrl_container *sprite_vrl_cont;\r
+       // Current sprite id\r
+       int curr_spri_id;\r
+       // Index of a current sprite in an animation sequence\r
+       int curr_anim_spri;\r
+       // Current animation sequence\r
+       struct vrs_animation_list_entry_t *curr_anim_list;\r
+       // Index of current animation in relevant VRS offsets table\r
+       int curr_anim;\r
+       // Delay in time units untill we should change sprite\r
+       int delay;\r
+       // Position of sprite on screen\r
+       int x, y;\r
+} sprite_t;\r
+#endif\r
+\r
 //newer structs\r
 typedef        struct\r
 {\r
@@ -128,35 +151,23 @@ typedef   struct
        int ty; //entity tile position on the viewable map\r
        int triggerx; //entity's trigger box tile position on the viewable map\r
        int triggery; //entity's trigger box tile position on the viewable map\r
-       int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x\r
-       int sheetsety; //NOT USED YET! entity sprite sheet set on the image y\r
+//     int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x\r
+//     int sheetsety; //NOT USED YET! entity sprite sheet set on the image y\r
        nibble d;               //direction to render sprite!! wwww\r
        nibble pred;    //prev. direction for animation changing\r
        word dire;              //sprite in use\r
        nibble q;               //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
        word speed;             //entity speed!\r
        word spt;               //speed per tile\r
-       struct sprite *spri; // sprite used by entity\r
+#ifdef __WATCOMC__\r
+       sprite_t *spri; // sprite used by entity\r
+#endif\r
        sword hp; //hitpoints of the entity\r
        nibble overdraww, overdrawh;    // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks.\r
                                                // if the sprite's edge pixels are clear anyway, you can set this to 0.\r
        nibble /*int*/ persist_aniframe;    // gonna be increased to 1 before being used, so 0 is ok for default\r
 } entity_t;\r
 \r
-//TODO: MAKE THIS WWWW\r
-typedef struct\r
-{\r
-       //sprite ....\r
-       boolean wwww;\r
-} spri_t;\r
-\r
-//TODO: MAKE THIS TO WWWW\r
-typedef struct\r
-{\r
-       //vrs with sprite ....\r
-       spri_t *spri;\r
-} vrs_t;\r
-\r
 //from 16_in\r
 //==========================================================================\r
 typedef        byte            ScanCode;\r
@@ -249,6 +260,11 @@ typedef struct
 } kurokku_t;\r
 \r
 //video\r
+typedef struct\r
+{\r
+       unsigned int offscreen_ofs;\r
+       unsigned int pattern_ofs;\r
+} ofs_t;\r
 #define NUMCHUNKS      416     //keen\r
 \r
 typedef struct\r
@@ -271,6 +287,7 @@ typedef struct
        word pr[MAXPAGE][4];    //render sections of pages (this is supposed to be set up to draw sections of the screen if updated)\r
 \r
        nibble sfip;            //shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible.\r
+       ofs_t   ofs;            //offset vars used for doslib\r
        word    vh;             //video combined height\r
        //0000word startclk; float clk, tickclk;        //timer\r
 //newer vars\r
@@ -520,8 +537,8 @@ typedef struct
        mminfo_t mm; mminfotype mmi;\r
 } global_game_variables_t;\r
 \r
-extern char global_temp_status_text[512];\r
 #ifdef __WATCOMC__\r
+extern char global_temp_status_text[512];\r
 #define EINVFMT EMFILE\r
 #endif\r
 #endif /* _TYPEDEFSTRUCT_H_ */\r