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
29namespace 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
46typedef bool PROGRAM_INITIALIZER();
47typedef void PROGRAM_TERMINATOR();
48
49typedef PROGRAM_INITIALIZER *pPROGRAM_INITIALIZER;
50typedef PROGRAM_TERMINATOR *pPROGRAM_TERMINATOR;
51
52// ------------------------------------------------------------------------
53// init, cleanup record
54
55struct 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
68int initState();
69void setInitState(int i);
70
71// ------------------------------------------------------------------------
72// System Init & Cleanup
73
74INITIALIZER(programInit);
75TERMINATOR(programTerm);
76
77// ------------------------------------------------------------------------
78// System error handling
79
80INITIALIZER(initErrorManagers);
81TERMINATOR(termErrorManagers);
82INITIALIZER(initDelayedErrors);
83TERMINATOR(termDelayedErrors);
84INITIALIZER(initActiveErrors) ;
85TERMINATOR(termActiveErrors) ;
86
87// ------------------------------------------------------------------------
88// Null initializer/ terminator
89
90INITIALIZER(initTowerBase);
91TERMINATOR(termTowerBase);
92
93} // end of namespace Saga2
94
95#endif
Definition: tower.h:55