]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_spri.h
updating copy left. i am super fuckin busy with school, and trying to get life back...
[16.git] / src / lib / 16_spri.h
index 5d1de10dea1f125f74ad840b369bb3c7b5d3a628..4a1d5389be1c6950a6d01b79afd258b2e4efd59e 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
 #ifndef __16_SPRI__\r
 #define __16_SPRI__\r
 \r
-#include "src/lib/16_vrs.h"\r
+//#include "src/lib/16_vrs.h"\r
+#include "src/lib/16_vl.h"\r
+//#include <hw/cpu/cpu.h>\r
+//#include <hw/dos/dos.h>\r
+#include <hw/vga/vrl.h>\r
+#include "src/lib/16_ca.h"\r
 #include "src/lib/scroll16.h"\r
 \r
+\r
+/*\r
+struct vrs_container{\r
+       // Size of a .vrs lob in memory\r
+       // minus header\r
+       dword data_size;\r
+       union{\r
+               byte far *buffer;\r
+               struct vrs_header far *vrs_hdr;\r
+       };\r
+       // Array of corresponding vrl line offsets\r
+       vrl1_vgax_offset_t **vrl_line_offsets;\r
+};\r
+*//*\r
+struct vrl_container{\r
+       // Size of a .vrl blob in memory\r
+       // minus header\r
+       dword data_size;\r
+       union{\r
+               byte far *buffer;\r
+               struct vrl1_vgax_header far *vrl_header;\r
+       };\r
+       // Pointer to a corresponding vrl line offsets struct\r
+       vrl1_vgax_offset_t *line_offsets;\r
+};\r
+*/\r
+/* Read .vrs file into memory\r
+* In:\r
+* + char *filename - name of the file to load\r
+* + struct vrs_container *vrs_cont - pointer to the vrs_container\r
+* to load the file into\r
+* Out:\r
+* + int - 0 on succes, 1 on failure\r
+*/\r
+void VRS_ReadVRS(char *filename, entity_t *enti, global_game_variables_t *gvar);\r
+void VRS_LoadVRS(char *filename, entity_t *enti, global_game_variables_t *gvar);\r
+void VRS_OpenVRS(char *filename, entity_t *enti, boolean rlsw, global_game_variables_t *gvar);\r
+void VRS_ReadVRL(char *filename, entity_t *enti, global_game_variables_t *gvar);\r
+void VRS_LoadVRL(char *filename, entity_t *enti, global_game_variables_t *gvar);\r
+void VRS_OpenVRL(char *filename, entity_t *enti, boolean rlsw, global_game_variables_t *gvar);\r
+\r
+/* Seek and return a specified .vrl blob from .vrs blob in memory\r
+* In:\r
+* + struct vrs_container *vrs_cont - pointer to the vrs_container\r
+* with a loaded .vrs file\r
+* + uint16_t id - id of the vrl to retrive\r
+* + struct vrl_container * vrl_cont - pointer to vrl_container to load to\r
+* Out:\r
+* int - operation status\r
+* to the requested .vrl blob\r
+*/\r
+int get_vrl_by_id(struct vrs_container far *vrs_cont, uint16_t id, struct vrl_container *vrl_cont);\r
+\r
+void DrawVRL (unsigned int x,unsigned int y,struct vrl1_vgax_header *hdr,vrl1_vgax_offset_t *lineoffs/*array hdr->width long*/,unsigned char *data,unsigned int datasz);\r
+\r
+//moved to 16_tdef.h\r
+// 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
+// };\r
+\r
 /* Retrive current animation name of sprite\r
 * In:\r
 * + struct sprite *spri - sprite to retrive current animation sequence name from\r