diff options
author | Max Horn | 2006-10-08 00:41:29 +0000 |
---|---|---|
committer | Max Horn | 2006-10-08 00:41:29 +0000 |
commit | e3797919fcd518f9b8ac640c7b6b427b1d6c891d (patch) | |
tree | 2a375cad4824655ed5d9bfe1b89e22b13e440a6f /engines/agos/vga.cpp | |
parent | d280234ae7ee3a336d87e8ef61c1af321926c02d (diff) | |
download | scummvm-rg350-e3797919fcd518f9b8ac640c7b6b427b1d6c891d.tar.gz scummvm-rg350-e3797919fcd518f9b8ac640c7b6b427b1d6c891d.tar.bz2 scummvm-rg350-e3797919fcd518f9b8ac640c7b6b427b1d6c891d.zip |
Replaced evil usage of static globals inside function by proper member variables
svn-id: r24183
Diffstat (limited to 'engines/agos/vga.cpp')
-rw-r--r-- | engines/agos/vga.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index 71f9fff097..1e533231dc 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -177,28 +177,23 @@ void AGOSEngine::setupFeebleVideoOpcodes(VgaOpcodeProc *op) { } void AGOSEngine::setupVgaOpcodes() { - static VgaOpcodeProc vga_opcode_table[100]; - - for (int i = 0; i < ARRAYSIZE(vga_opcode_table); i++) - vga_opcode_table[i] = NULL; - - _vga_opcode_table = vga_opcode_table; + memset(_vga_opcode_table, 0, sizeof(_vga_opcode_table)); switch (getGameType()) { case GType_ELVIRA1: - setupElvira1VideoOpcodes(vga_opcode_table); + setupElvira1VideoOpcodes(_vga_opcode_table); break; case GType_ELVIRA2: case GType_WW: case GType_SIMON1: - setupCommonVideoOpcodes(vga_opcode_table); + setupCommonVideoOpcodes(_vga_opcode_table); break; case GType_SIMON2: - setupSimon2VideoOpcodes(vga_opcode_table); + setupSimon2VideoOpcodes(_vga_opcode_table); break; case GType_FF: case GType_PP: - setupFeebleVideoOpcodes(vga_opcode_table); + setupFeebleVideoOpcodes(_vga_opcode_table); break; default: error("setupVgaOpcodes: Unknown game"); |