source: golgotha/src/i4/lisp/li_init.hh @ 80

Last change on this file since 80 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.3 KB
Line 
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_INIT_HH
10#define LI_INIT_HH
11
12
13
14#include "init/init.hh"
15#include "lisp/lisp.hh"
16
17
18#define li_automatic_add_function(fun_name, char_name)             \
19class li_add_##fun_name##_class : public i4_init_class             \
20{                                                                  \
21  int init_type() { return I4_INIT_TYPE_LISP_FUNCTIONS; }          \
22  void init()  { li_add_function(char_name, fun_name);  }          \
23} li_add_function_##fun_name
24
25
26#define li_automatic_add_type(type, var)                           \
27class li_add_##type##_class : public i4_init_class                 \
28{                                                                  \
29  int init_type() { return I4_INIT_TYPE_LISP_FUNCTIONS; }          \
30  void init()  { var=li_add_type(new type);  }                     \
31} li_add_type_##type##_instance
32
33
34#endif
Note: See TracBrowser for help on using the repository browser.