X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Flib%2F16_vrs.h;h=cdeb81a0cf74a1cdfa97abff15bacb9c76857419;hb=7b06bf5a3bc4142d3b2494ce9b2ca21ea63283d2;hp=38b8132ddd0e71488668ad3d3b8ab94bcb166f42;hpb=781dba2e4095d0e72af3f0c38d2de7bafc21c57d;p=16.git
diff --git a/src/lib/16_vrs.h b/src/lib/16_vrs.h
old mode 100644
new mode 100755
index 38b8132d..cdeb81a0
--- a/src/lib/16_vrs.h
+++ b/src/lib/16_vrs.h
@@ -1,21 +1,78 @@
-#include "hw/vga/vrl.h"
-#include "hw/vga/vrs.h"
-
-struct vrs_container{
- unsigned long size;
- union{
- unsigned char *buffer;
- struct vrs_header *vrs_hdr;
- };
-};
-
-struct vrl_container{
- unsigned long size;
- union{
- unsigned char *buffer;
- struct vrl1_vgax_header *vrl_header;
- };
-};
-
-int read_vrs(char *filename, struct vrs_container *vrs_cont);
-struct vrl_container* get_vrl_by_id(struct vrs_container *vrs_cont, uint16_t id);
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see , or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+#ifndef __16_VRS__
+#define __16_VRS__
+
+#include "src/lib/modex16.h"
+#include "src/lib/typdefst.h"
+//#include
+//#include
+#include
+#include "src/lib/16_ca.h"
+
+struct vrs_container{
+ // Size of a .vrs lob in memory
+ // minus header
+ dword data_size;
+ union{
+ byte huge *buffer;
+ struct vrs_header huge *vrs_hdr;
+ };
+ // Array of corresponding vrl line offsets
+ vrl1_vgax_offset_t **vrl_line_offsets;
+};
+
+struct vrl_container{
+ // Size of a .vrl blob in memory
+ // minus header
+ dword data_size;
+ union{
+ byte huge *buffer;
+ struct vrl1_vgax_header huge *vrl_header;
+ };
+ // Pointer to a corresponding vrl line offsets struct
+ vrl1_vgax_offset_t *line_offsets;
+};
+
+/* Read .vrs file into memory
+* In:
+* + char *filename - name of the file to load
+* + struct vrs_container *vrs_cont - pointer to the vrs_container
+* to load the file into
+* Out:
+* + int - 0 on succes, 1 on failure
+*/
+int read_vrs(global_game_variables_t *gvar, char *filename, struct vrs_container *vrs_cont);
+
+/* Seek and return a specified .vrl blob from .vrs blob in memory
+* In:
+* + struct vrs_container *vrs_cont - pointer to the vrs_container
+* with a loaded .vrs file
+* + uint16_t id - id of the vrl to retrive
+* + struct vrl_container * vrl_cont - pointer to vrl_container to load to
+* Out:
+* int - operation status
+* to the requested .vrl blob
+*/
+int get_vrl_by_id(struct vrs_container *vrs_cont, uint16_t id, struct vrl_container * vrl_cont);
+
+#endif