mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
Fixing the Gob3 CD crash on ARM systems/ports
svn-id: r29235
This commit is contained in:
parent
41d67964b1
commit
dd5be6826a
@ -1060,14 +1060,14 @@ void Game_v1::collisionsBlock(void) {
|
||||
_vm->_util->prepareStr(_collStr);
|
||||
|
||||
if (strcmp(_tempStr, _collStr) == 0) {
|
||||
VAR(17)++;
|
||||
WRITE_VAR(17, VAR(17) + 1);
|
||||
WRITE_VAR(17 + var_26, 1);
|
||||
break;
|
||||
}
|
||||
} while (READ_LE_UINT16(descArray[var_24].ptr - 2) > pos);
|
||||
collStackPos++;
|
||||
} else {
|
||||
VAR(17 + var_26) = 2;
|
||||
WRITE_VAR(17 + var_26, 2);
|
||||
}
|
||||
var_24++;
|
||||
var_26++;
|
||||
|
@ -1094,14 +1094,14 @@ void Game_v2::collisionsBlock(void) {
|
||||
_vm->_util->prepareStr(_collStr);
|
||||
|
||||
if (strcmp(_tempStr, _collStr) == 0) {
|
||||
VAR(17)++;
|
||||
WRITE_VAR(17, VAR(17) + 1);
|
||||
WRITE_VAR(17 + var_26, 1);
|
||||
break;
|
||||
}
|
||||
} while (READ_LE_UINT16(descArray[var_24].ptr - 2) > pos);
|
||||
collStackPos++;
|
||||
} else {
|
||||
VAR(17 + var_26) = 2;
|
||||
WRITE_VAR(17 + var_26, 2);
|
||||
}
|
||||
var_24++;
|
||||
var_26++;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#define GOB_GLOBAL_H
|
||||
|
||||
#include "common/file.h"
|
||||
#include "common/endian.h"
|
||||
|
||||
#include "gob/video.h"
|
||||
|
||||
@ -156,11 +157,11 @@ public:
|
||||
}
|
||||
|
||||
void writeVar(uint32 offset, uint32 val) {
|
||||
(*(uint32 *)(_inter_variables + offset)) = val;
|
||||
WRITE_UINT32(_inter_variables + offset, val);
|
||||
writeVarSize(offset, 3);
|
||||
}
|
||||
void writeVar(uint32 offset, uint16 val) {
|
||||
(*(uint16 *)(_inter_variables + offset)) = val;
|
||||
WRITE_UINT16(_inter_variables + offset, val);
|
||||
writeVarSize(offset, 1);
|
||||
}
|
||||
void writeVar(uint32 offset, uint8 val) {
|
||||
|
@ -63,8 +63,8 @@ class Adlib;
|
||||
#define WRITE_VAR_UINT16(var, val) WRITE_VARO_UINT16((var) << 2, (val))
|
||||
#define WRITE_VAR_UINT8(var, val) WRITE_VARO_UINT8((var) << 2, (val))
|
||||
#define WRITE_VAR_STR(var, str) WRITE_VARO_STR((var) << 2, (str))
|
||||
#define READ_VARO_UINT32(offs) (*((uint32 *) VARP(offs)))
|
||||
#define READ_VARO_UINT16(offs) (*((uint16 *) VARP(offs)))
|
||||
#define READ_VARO_UINT32(offs) READ_UINT32(VARP(offs))
|
||||
#define READ_VARO_UINT16(offs) READ_UINT16(VARP(offs))
|
||||
#define READ_VARO_UINT8(offs) (*((uint8 *) VARP(offs)))
|
||||
#define READ_VAR_UINT32(var) READ_VARO_UINT32((var) << 2)
|
||||
#define READ_VAR_UINT16(var) READ_VARO_UINT16((var) << 2)
|
||||
|
Loading…
Reference in New Issue
Block a user