ScummVM API documentation
tower.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * aint32 with this program; if not, write to the Free Software
19  *
20  *
21  * Based on the original sources
22  * Faery Tale II -- The Halls of the Dead
23  * (c) 1993-1996 The Wyrmkeep Entertainment Co.
24  */
25 
26 #ifndef SAGA2_TOWER_H
27 #define SAGA2_TOWER_H
28 
29 namespace Saga2 {
30 
31 /* ===================================================================== *
32  definitions
33  * ===================================================================== */
34 
35 // Program initialization code
36 #define INITIALIZER(name) bool name( void )
37 // Program cleanup code
38 #define TERMINATOR(name) void name( void )
39 
40 /* ===================================================================== *
41  Types
42  * ===================================================================== */
43 
44 // ------------------------------------------------------------------------
45 // function types for init & cleanup
46 typedef bool PROGRAM_INITIALIZER();
47 typedef void PROGRAM_TERMINATOR();
48 
49 typedef PROGRAM_INITIALIZER *pPROGRAM_INITIALIZER;
50 typedef PROGRAM_TERMINATOR *pPROGRAM_TERMINATOR;
51 
52 // ------------------------------------------------------------------------
53 // init, cleanup record
54 
55 struct TowerLayer {
56  int ord;
57  pPROGRAM_INITIALIZER init;
58  pPROGRAM_TERMINATOR term;
59 };
60 
61 /* ===================================================================== *
62  Prototypes
63  * ===================================================================== */
64 
65 // ------------------------------------------------------------------------
66 // state transition hooks for debugging
67 
68 int initState();
69 void setInitState(int i);
70 
71 // ------------------------------------------------------------------------
72 // System Init & Cleanup
73 
74 INITIALIZER(programInit);
75 TERMINATOR(programTerm);
76 
77 // ------------------------------------------------------------------------
78 // System error handling
79 
80 INITIALIZER(initErrorManagers);
81 TERMINATOR(termErrorManagers);
82 INITIALIZER(initDelayedErrors);
83 TERMINATOR(termDelayedErrors);
84 INITIALIZER(initActiveErrors) ;
85 TERMINATOR(termActiveErrors) ;
86 
87 // ------------------------------------------------------------------------
88 // Null initializer/ terminator
89 
90 INITIALIZER(initTowerBase);
91 TERMINATOR(termTowerBase);
92 
93 } // end of namespace Saga2
94 
95 #endif
Definition: actor.h:32
Definition: tower.h:55