aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
authorPaul Gilbert2018-12-13 19:54:50 -0800
committerPaul Gilbert2018-12-13 19:54:50 -0800
commit38e422f874b2f90febb1647d81a1efed4bfce066 (patch)
tree72b30b08849a4aa68d2f24f5b110deabfc8cfb2e /engines/glk
parent6c5f71560907302e2c5ac7eb5308281937e3eddc (diff)
downloadscummvm-rg350-38e422f874b2f90febb1647d81a1efed4bfce066.tar.gz
scummvm-rg350-38e422f874b2f90febb1647d81a1efed4bfce066.tar.bz2
scummvm-rg350-38e422f874b2f90febb1647d81a1efed4bfce066.zip
GLK: FROTZ: Fix Visual Studio warnings about packing alignment
They were really bugging me, so I've changed the fixed size opcode arrays to Common::Array, which fixes the warnings
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/frotz/processor.cpp6
-rw-r--r--engines/glk/frotz/processor.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp
index 8cfff9cd1b..5553b04595 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/frotz/processor.cpp
@@ -176,8 +176,10 @@ Processor::Processor(OSystem *syst, const GlkGameDescription &gameDesc) :
&Processor::z_call_n
};
- Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], op0_opcodes);
- Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], op1_opcodes);
+ op0_opcodes.resize(16);
+ op1_opcodes.resize(16);
+ Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], &op0_opcodes[0]);
+ Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], &op1_opcodes[0]);
Common::fill(&_stack[0], &_stack[STACK_SIZE], 0);
Common::fill(&zargs[0], &zargs[8], 0);
Common::fill(&_buffer[0], &_buffer[TEXT_BUFFER_SIZE], '\0');
diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h
index 5d6d4487f9..9bb104c7c4 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/frotz/processor.h
@@ -53,11 +53,11 @@ typedef void (Processor::*Opcode)();
class Processor : public GlkInterface, public virtual Mem {
friend class Quetzal;
private:
- Opcode op0_opcodes[16];
- Opcode op1_opcodes[16];
static const char *const ERR_MESSAGES[ERR_NUM_ERRORS];
static Opcode var_opcodes[64];
static Opcode ext_opcodes[64];
+ Common::Array<Opcode> op0_opcodes;
+ Common::Array<Opcode> op1_opcodes;
int _finished;
zword zargs[8];