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
This commit is contained in:
Paul Gilbert 2018-12-13 19:54:50 -08:00
parent 6c5f715609
commit 38e422f874
2 changed files with 6 additions and 4 deletions

View File

@ -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');

View File

@ -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];