Intro file should be the one to handle the intro sequence, even if it is only one...
[supertux.git] / src / lispreader.h
index d427414..f18a2f0 100644 (file)
@@ -25,6 +25,8 @@
 #define __LISPREADER_H__
 
 #include <stdio.h>
+#include <zlib.h>
+#include <string>
 #include <vector>
 
 #define LISP_STREAM_FILE       1
@@ -105,6 +107,7 @@ struct _lisp_object_t
       } v;
   };
 
+lisp_stream_t* lisp_stream_init_gzfile (lisp_stream_t *stream, gzFile file);
 lisp_stream_t* lisp_stream_init_file (lisp_stream_t *stream, FILE *file);
 lisp_stream_t* lisp_stream_init_string (lisp_stream_t *stream, char *buf);
 lisp_stream_t* lisp_stream_init_any (lisp_stream_t *stream, void *data,
@@ -112,6 +115,7 @@ lisp_stream_t* lisp_stream_init_any (lisp_stream_t *stream, void *data,
                                      void (*unget_char) (char c, void *data));
 
 lisp_object_t* lisp_read (lisp_stream_t *in);
+lisp_object_t* lisp_read_from_file(const std::string& filename);
 void lisp_free (lisp_object_t *obj);
 
 lisp_object_t* lisp_read_from_string (const char *buf);
@@ -165,9 +169,14 @@ class LispReader
     /** cur == ((pos 1 2 3) (id 12 3 4)...) */
     LispReader (lisp_object_t* l);
 
+    bool read_int_vector (const char* name, std::vector<int>* vec);
+    bool read_char_vector (const char* name, std::vector<char>* vec);
+    bool read_string_vector (const char* name, std::vector<std::string>* vec);
+    bool read_string (const char* name, std::string* str);
     bool read_int (const char* name, int* i);
     bool read_float (const char* name, float* f);
     bool read_bool (const char* name, bool* b);
+    bool read_lisp (const char* name, lisp_object_t** b);
   };
 
 /** */