mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-15 06:18:33 +00:00
GRIM: rename TARGET_64BITS to SCUMM_64BITS
This commit is contained in:
parent
b15eee129d
commit
606092c9b5
@ -111,7 +111,7 @@ struct ArrayIDObj {
|
||||
};
|
||||
|
||||
static int sortCallback(const void *id1, const void *id2) {
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
uint64 p1 = ((ArrayIDObj *)id1)->idObj.low | ((uint64)(((ArrayIDObj *)id1)->idObj.hi)) << 32;
|
||||
uint64 p2 = ((ArrayIDObj *)id2)->idObj.low | ((uint64)(((ArrayIDObj *)id2)->idObj.hi)) << 32;
|
||||
if (p1 > p2) {
|
||||
@ -144,7 +144,7 @@ static bool arraysAllreadySort = false;
|
||||
|
||||
static void recreateObj(TObject *obj) {
|
||||
if (obj->ttype == LUA_T_CPROTO) {
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
uint64 id = ((uint64)(obj->value.f)) >> 16;
|
||||
#else
|
||||
uint32 id = ((uint32)(obj->value.f)) >> 16;
|
||||
@ -157,7 +157,7 @@ static void recreateObj(TObject *obj) {
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
int32 numberFunc = (uint64)(obj->value.f) & 0xffff;
|
||||
#else
|
||||
int32 numberFunc = (uint32)(obj->value.f) & 0xffff;
|
||||
|
@ -22,7 +22,7 @@ namespace Grim {
|
||||
PointerId makeIdFromPointer(void *ptr) {
|
||||
PointerId pointer;
|
||||
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
uint64 v = (uint64)ptr;
|
||||
pointer.low = v & 0xffffffff;
|
||||
pointer.hi = v >> 32;
|
||||
@ -37,7 +37,7 @@ PointerId makeIdFromPointer(void *ptr) {
|
||||
void *makePointerFromId(PointerId ptr) {
|
||||
void *pointer;
|
||||
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
uint64 v = ptr.low | ((uint64)ptr.hi << 32);
|
||||
pointer = (void *)v;
|
||||
#else
|
||||
|
@ -33,7 +33,7 @@ void luaS_init() {
|
||||
static uint32 hash(const char *s, int32 tag) {
|
||||
uint32 h;
|
||||
if (tag != LUA_T_STRING) {
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
h = (uint64)s;
|
||||
#else
|
||||
h = (uint32)s;
|
||||
@ -121,7 +121,7 @@ static TaggedString *insert(const char *buff, int32 tag, stringtable *tb) {
|
||||
}
|
||||
|
||||
TaggedString *luaS_createudata(void *udata, int32 tag) {
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
return insert((char *)udata, tag, &string_root[(uint64)udata % NUM_HASHS]);
|
||||
#else
|
||||
return insert((char *)udata, tag, &string_root[(uint32)udata % NUM_HASHS]);
|
||||
@ -129,7 +129,7 @@ TaggedString *luaS_createudata(void *udata, int32 tag) {
|
||||
}
|
||||
|
||||
TaggedString *luaS_new(const char *str) {
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
return insert(str, LUA_T_STRING, &string_root[(uint64)str[0] % NUM_HASHS]);
|
||||
#else
|
||||
return insert(str, LUA_T_STRING, &string_root[(uint32)str[0] % NUM_HASHS]);
|
||||
|
@ -21,7 +21,7 @@ namespace Grim {
|
||||
#define REHASH_LIMIT 0.70 // avoid more than this % full
|
||||
#define TagDefault LUA_T_ARRAY;
|
||||
|
||||
#ifdef TARGET_64BITS
|
||||
#ifdef SCUMM_64BITS
|
||||
static int64 hashindex(TObject *ref) {
|
||||
int64 h;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user