mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
- Stubbed goblinFunc(), it's completeley different; now it at least
doesn't crash anymore - Reduced valgrind's complains about unitialized memory svn-id: r22263
This commit is contained in:
parent
61a0266a92
commit
8a855b4251
@ -316,6 +316,7 @@ protected:
|
||||
void o2_stub0x56(void);
|
||||
void o2_stub0x80(void);
|
||||
void o2_renderStatic(void);
|
||||
bool o2_goblinFunc(char &cmdCount, int16 &counter, int16 &retFlag);
|
||||
bool o2_evaluateStore(char &cmdCount, int16 &counter, int16 &retFlag);
|
||||
bool o2_palLoad(char &cmdCount, int16 &counter, int16 &retFlag);
|
||||
bool o2_loadTot(char &cmdCount, int16 &counter, int16 &retFlag);
|
||||
|
@ -492,7 +492,7 @@ void Inter_v2::setupOpcodes(void) {
|
||||
OPCODE(o1_speakerOff),
|
||||
/* 24 */
|
||||
OPCODE(o1_putPixel),
|
||||
OPCODE(o1_goblinFunc),
|
||||
OPCODE(o2_goblinFunc),
|
||||
OPCODE(o1_createSprite),
|
||||
OPCODE(o2_freeSprite),
|
||||
/* 28 */
|
||||
@ -1008,6 +1008,35 @@ void Inter_v2::loadMult(void) {
|
||||
warning("GOB2 Stub! Inter_v2::loadMult()");
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_goblinFunc(char &cmdCount, int16 &counter, int16 &retFlag) {
|
||||
int16 cmd;
|
||||
int16 word_2F9C0;
|
||||
int16 word_2F9BE;
|
||||
int16 word_2F9BC;
|
||||
int16 word_2F9BA;
|
||||
char *dword_2F9B6;
|
||||
char *dword_2F9B2;
|
||||
|
||||
cmd = load16();
|
||||
_vm->_global->_inter_execPtr += 2;
|
||||
|
||||
if (cmd == 100) {
|
||||
word_2F9C0 = VAR(load16());
|
||||
word_2F9BE = VAR(load16());
|
||||
dword_2F9B6 = _vm->_global->_inter_variables + (load16() >> 2);
|
||||
dword_2F9B2 = _vm->_global->_inter_variables + (load16() >> 2);
|
||||
word_2F9BC = VAR(load16());
|
||||
word_2F9BA = VAR(load16());
|
||||
warning("GOB2 Stub! sub_19BD3()");
|
||||
} else if (cmd != 101) {
|
||||
_vm->_global->_inter_execPtr -= 2;
|
||||
cmd = load16();
|
||||
_vm->_global->_inter_execPtr += cmd << 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Inter_v2::o2_evaluateStore(char &cmdCount, int16 &counter, int16 &retFlag) {
|
||||
char *savedPos;
|
||||
int16 varOff;
|
||||
|
@ -37,7 +37,7 @@ Parse::Parse(GobEngine *vm) : _vm(vm) {
|
||||
}
|
||||
|
||||
int32 Parse::encodePtr(char *ptr, int type) {
|
||||
int32 offset;
|
||||
int32 offset = 0;
|
||||
|
||||
switch (type) {
|
||||
case kExecPtr:
|
||||
|
@ -127,6 +127,7 @@ Video::SurfaceDesc *Video_v2::initSurfDesc(int16 vidMode, int16 width, int16 hei
|
||||
if (descPtr->vidPtr != 0)
|
||||
delete[] descPtr->vidPtr;
|
||||
vidMem = new byte[320 * 200];
|
||||
memset(vidMem, 0, 64000);
|
||||
} else {
|
||||
if (flags & DISABLE_SPR_ALLOC) {
|
||||
descPtr = new SurfaceDesc;
|
||||
@ -135,6 +136,7 @@ Video::SurfaceDesc *Video_v2::initSurfDesc(int16 vidMode, int16 width, int16 hei
|
||||
} else {
|
||||
descPtr = new SurfaceDesc;
|
||||
descPtr->vidPtr = new byte[sprSize];
|
||||
memset(descPtr->vidPtr, 0, sprSize);
|
||||
vidMem = descPtr->vidPtr;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user