source: golgotha/src/golg/map_vars.cc

Last change on this file was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.5 KB
RevLine 
[80]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#include "map_vars.hh"
10#include "lisp/li_load.hh"
11#include "saver.hh"
12#include "map.hh"
13#include "lisp/lisp.hh"
14#include "lisp/li_init.hh"
15#include "lisp/li_dialog.hh"
16
17void g1_map_vars_class::load(g1_loader_class *fp, w32 sections)
18{
19  if ((sections & G1_MAP_VARS) && fp)
20    if (fp->goto_section("level vars"))
21      var_ptr=li_load_typed_object("level_vars", fp, fp->li_remap,0); 
22    else var_ptr=li_new("level_vars");
23
24}
25
26
27void g1_map_vars_class::save(g1_saver_class *fp, w32 sections)
28{
29  if (sections & G1_MAP_VARS)
30  {
31    fp->mark_section("level vars");
32    li_save_object(fp, var_ptr.get(), 0);
33  }
34
35}
36
37g1_map_vars_class g1_map_vars;
38
39li_object *g1_set_level_vars(li_object *o, li_environment *env)
40{
41  g1_map_vars.var_ptr=li_car(o, env);
42  return 0;
43}
44
45
46
47li_object *g1_edit_level_vars(li_object *o, li_environment *env)
48{
49  li_create_dialog("Level Vars", g1_map_vars.var_ptr.get(), 0, g1_set_level_vars);
50  return 0;
51}
52
53li_automatic_add_function(g1_edit_level_vars, "edit_level_vars");
54
55
56
Note: See TracBrowser for help on using the repository browser.