SCI: Made vocab_version static again (a global static var is bad, but a really global var is worse); also clarified some FIXME comments that we want to avoid *any* non-const global var, no matter whether it is static or not

svn-id: r41045
This commit is contained in:
Max Horn 2009-05-30 20:37:33 +00:00
parent 539094d5a8
commit 70a04c8b51
7 changed files with 10 additions and 10 deletions

@ -41,7 +41,7 @@ namespace Sci {
#define TOKEN_NON_NT (TOKEN_OPAREN | TOKEN_TERMINAL_CLASS | TOKEN_TERMINAL_GROUP | TOKEN_STUFFING_WORD)
#define TOKEN_TERMINAL (TOKEN_TERMINAL_CLASS | TOKEN_TERMINAL_GROUP)
static int _allocd_rules = 0; // FIXME: Avoid static vars
static int _allocd_rules = 0; // FIXME: Avoid non-cpnst global vars
int getAllocatedRulesCount() { return _allocd_rules; }

@ -480,9 +480,9 @@ void _k_graph_rebuild_port_with_color(EngineState *s, gfx_color_t newbgcolor) {
delete port;
}
static bool activated_icon_bar = false; // FIXME: Avoid static vars
static int port_origin_x = 0; // FIXME: Avoid static vars
static int port_origin_y = 0; // FIXME: Avoid static vars
static bool activated_icon_bar = false; // FIXME: Avoid non-cpnst global vars
static int port_origin_x = 0; // FIXME: Avoid non-cpnst global vars
static int port_origin_y = 0; // FIXME: Avoid non-cpnst global vars
reg_t kGraph(EngineState *s, int funct_nr, int argc, reg_t *argv) {
rect_t area;
@ -1776,7 +1776,7 @@ void _k_view_list_mark_free(EngineState *s, reg_t off) {
}
}
static bool _k_animate_ran = false; // FIXME: Avoid static vars
static bool _k_animate_ran = false; // FIXME: Avoid non-cpnst global vars
int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, int funct_nr, int argc, reg_t *argv) {
// disposes all list members flagged for disposal; funct_nr is the invoking kfunction

@ -237,7 +237,7 @@ enum Movecnt {
UNINITIALIZED
};
static Movecnt handle_movecnt = UNINITIALIZED; // FIXME: Avoid static vars
static Movecnt handle_movecnt = UNINITIALIZED; // FIXME: Avoid non-cpnst global vars
/**
* Address parameters may be passed in one of three forms:

@ -255,7 +255,7 @@ struct PathfindingState {
};
static Vertex *s_vertex_cur; // FIXME: Avoid static vars
static Vertex *s_vertex_cur; // FIXME: Avoid non-cpnst global vars
// FIXME: Temporary hack to deal with points in reg_ts
static bool polygon_is_reg_t(const byte *list, int size) {

@ -1382,7 +1382,7 @@ static int _gfxop_numlockify(int c) {
}
static sci_event_t scummvm_get_event(gfx_driver_t *drv) {
static int _modifierStates = 0; // FIXME: EVIL HACK
static int _modifierStates = 0; // FIXME: Avoid non-cpnst global vars
sci_event_t input = { SCI_EVT_NONE, 0, 0, 0 };
Common::EventManager *em = g_system->getEventManager();

@ -44,7 +44,7 @@
namespace Sci {
class SfxPlayer;
SfxPlayer *player = NULL; // FIXME: Avoid static vars
SfxPlayer *player = NULL; // FIXME: Avoid non-cpnst global vars
#pragma mark -

@ -32,7 +32,7 @@
namespace Sci {
int vocab_version = 0;
static int vocab_version = 0; // FIXME: Avoid non-cpnst global vars
#if 0