diff options
author | Simon Howard | 2006-12-01 08:57:15 +0000 |
---|---|---|
committer | Simon Howard | 2006-12-01 08:57:15 +0000 |
commit | 75291ab3a5876758018154c4b66aaca6b43547eb (patch) | |
tree | b47b84ea84f6457a06efd1c09f09fd0c3895be4b | |
parent | a67482a15852f66bec73edb6f9237da61bdf8211 (diff) | |
download | chocolate-doom-75291ab3a5876758018154c4b66aaca6b43547eb.tar.gz chocolate-doom-75291ab3a5876758018154c4b66aaca6b43547eb.tar.bz2 chocolate-doom-75291ab3a5876758018154c4b66aaca6b43547eb.zip |
Fixups to make compiles work under the Solaris/SPARC compiler. Thanks to
Mike Spooner <spooferman@excite.com> for his work on porting this.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 763
-rw-r--r-- | setup/multiplayer.c | 4 | ||||
-rw-r--r-- | src/deh_mapping.c | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/setup/multiplayer.c b/setup/multiplayer.c index 22788302..74da82b5 100644 --- a/setup/multiplayer.c +++ b/setup/multiplayer.c @@ -59,8 +59,8 @@ static char *gamemodes[] = char *net_player_name; char *chat_macros[10]; -static char *wads[NUM_WADS] = {}; -static char *extra_params[NUM_EXTRA_PARAMS] = {}; +static char *wads[NUM_WADS]; +static char *extra_params[NUM_EXTRA_PARAMS]; static int skill = 2; static int nomonsters = 0; static int deathmatch = 0; diff --git a/src/deh_mapping.c b/src/deh_mapping.c index 13e80740..a818e7a9 100644 --- a/src/deh_mapping.c +++ b/src/deh_mapping.c @@ -56,7 +56,7 @@ boolean DEH_SetMapping(deh_context_t *context, deh_mapping_t *mapping, return false; } - location = structptr + (entry->location - mapping->base); + location = (uint8_t *)structptr + ((uint8_t *)entry->location - (uint8_t *)mapping->base); // printf("Setting %p::%s to %i (%i bytes)\n", // structptr, name, value, entry->size); @@ -64,13 +64,13 @@ boolean DEH_SetMapping(deh_context_t *context, deh_mapping_t *mapping, switch (entry->size) { case 1: - * ((unsigned char *) location) = value; + * ((uint8_t *) location) = value; break; case 2: - * ((unsigned short *) location) = value; + * ((uint16_t *) location) = value; break; case 4: - * ((unsigned int *) location) = value; + * ((uint32_t *) location) = value; break; default: DEH_Error(context, "Unknown field type for '%s' (BUG)", name); @@ -109,18 +109,18 @@ void DEH_StructMD5Sum(md5_context_t *context, deh_mapping_t *mapping, // Add in data for this field - location = structptr + (entry->location - mapping->base); + location = (uint8_t *)structptr + ((uint8_t *)entry->location - (uint8_t *)mapping->base); switch (entry->size) { case 1: - MD5_UpdateInt32(context, *((unsigned char *) location)); + MD5_UpdateInt32(context, *((uint8_t *) location)); break; case 2: - MD5_UpdateInt32(context, *((unsigned short *) location)); + MD5_UpdateInt32(context, *((uint16_t *) location)); break; case 4: - MD5_UpdateInt32(context, *((unsigned int *) location)); + MD5_UpdateInt32(context, *((uint32_t *) location)); break; default: I_Error("Unknown dehacked mapping field type for '%s' (BUG)", |