1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #ifndef LI_LOAD_HH
|
---|
10 | #define LI_LOAD_HH
|
---|
11 |
|
---|
12 |
|
---|
13 | #include "lisp/li_types.hh"
|
---|
14 |
|
---|
15 | class i4_loader_class;
|
---|
16 | class i4_saver_class;
|
---|
17 |
|
---|
18 | // returns a remap array for li_ type numbers from old to new
|
---|
19 | // these should be freed by li_free_type_info
|
---|
20 | li_type_number *li_load_type_info(i4_loader_class *fp, li_environment *env);
|
---|
21 | void li_free_type_info(li_type_number *remap);
|
---|
22 |
|
---|
23 | // this saves the names of the types so the can be found and
|
---|
24 | // a remap can be created on load-up
|
---|
25 | void li_save_type_info(i4_saver_class *fp, li_environment *env);
|
---|
26 |
|
---|
27 |
|
---|
28 | // loads some object from disk : if the object type no longer exist
|
---|
29 | // it is skiped over and 0 is returned
|
---|
30 | li_object *li_load_object(i4_loader_class *fp, li_type_number *type_remap, li_environment *env);
|
---|
31 |
|
---|
32 | // saves an object to disk
|
---|
33 | void li_save_object(i4_saver_class *fp, li_object *o, li_environment *env);
|
---|
34 |
|
---|
35 | // if you need to save a li_type_number to disk
|
---|
36 | void li_save_type(i4_file_class *fp, li_type_number type);
|
---|
37 |
|
---|
38 | // loads a li_type_number from disk
|
---|
39 | li_type_number li_load_type(i4_file_class *fp, li_type_number *type_remap);
|
---|
40 |
|
---|
41 |
|
---|
42 | // loads an object from disk. If the type is not the type requested, it is discarded
|
---|
43 | // and li_new is called to create a new instance of this type
|
---|
44 | li_object *li_load_typed_object(char *type_name, i4_loader_class *fp,
|
---|
45 | li_type_number *type_remap,
|
---|
46 | li_environment *env);
|
---|
47 |
|
---|
48 | li_object *li_load_typed_object(int type, i4_loader_class *fp, li_type_number *type_remap,
|
---|
49 | li_environment *env);
|
---|
50 |
|
---|
51 | #endif
|
---|