forked from rosebudai/OpenRCT2-Web
commit
485b8d1508
9 files changed
+28
-27
No files matched your search
@@ -430,7 +430,7 @@ void format_length(char **dest, sint16 value)
|
||||
stringId--;
|
||||
}
|
||||
|
||||
uint16 *argRef = &value;
|
||||
sint16 *argRef = &value;
|
||||
format_string_part(dest, stringId, (char**)&argRef);
|
||||
(*dest)--;
|
||||
}
|
||||
|
||||
+9
-9
@@ -80,7 +80,7 @@ int object_load_file(int groupIndex, const rct_object_entry *entry, int* chunkSi
|
||||
|
||||
// Read chunk size
|
||||
*chunkSize = *((uint32*)installedObject_pointer);
|
||||
char *chunk;
|
||||
uint8 *chunk;
|
||||
|
||||
if (*chunkSize == 0xFFFFFFFF) {
|
||||
chunk = rct2_malloc(0x600000);
|
||||
@@ -137,7 +137,7 @@ int object_load_file(int groupIndex, const rct_object_entry *entry, int* chunkSi
|
||||
memcpy(extended_entry, &openedEntry, sizeof(rct_object_entry));
|
||||
extended_entry->chunk_size = *chunkSize;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURR_OBJECT_CHUNK_POINTER, char*) = chunk;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURR_OBJECT_CHUNK_POINTER, uint8*) = chunk;
|
||||
|
||||
if (RCT2_GLOBAL(0x9ADAFD, uint8) != 0)
|
||||
object_paint(objectType, 0, groupIndex, objectType, 0, (int)chunk, 0, 0);
|
||||
@@ -347,7 +347,7 @@ void object_unload(rct_object_entry *entry)
|
||||
object_paint(object_type, 1, 0, 0, 0, (int)chunk, 0, 0);
|
||||
|
||||
rct2_free(chunk);
|
||||
object_entry_groups[object_type].chunks[object_index] = (char*)-1;
|
||||
object_entry_groups[object_type].chunks[object_index] = (uint8*)-1;
|
||||
}
|
||||
|
||||
int object_entry_compare(const rct_object_entry *a, const rct_object_entry *b)
|
||||
@@ -375,7 +375,7 @@ int object_entry_compare(const rct_object_entry *a, const rct_object_entry *b)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int object_calculate_checksum(const rct_object_entry *entry, const char *data, int dataLength)
|
||||
int object_calculate_checksum(const rct_object_entry *entry, const uint8 *data, int dataLength)
|
||||
{
|
||||
int i;
|
||||
const char *eee = (char*)entry;
|
||||
@@ -458,7 +458,7 @@ int paint_ride_entry(int flags, int ebx, int ecx, int edx, rct_drawpixelinfo* dp
|
||||
chunk += 0x60;
|
||||
}
|
||||
|
||||
sint8* peep_loading_positions = chunk;
|
||||
sint8* peep_loading_positions = (sint8 *)chunk;
|
||||
// Peep loading positions variable size
|
||||
// 4 different vehicle subtypes are available
|
||||
for (int i = 0; i < 4; ++i){
|
||||
@@ -642,8 +642,8 @@ int paint_ride_entry(int flags, int ebx, int ecx, int edx, rct_drawpixelinfo* dp
|
||||
set_vehicle_type_image_max_sizes(rideVehicleEntry, num_images);
|
||||
}
|
||||
|
||||
uint8 no_positions = *peep_loading_positions++;
|
||||
if (no_positions == 0xFF)
|
||||
sint8 no_positions = *peep_loading_positions++;
|
||||
if (no_positions == -1)
|
||||
{
|
||||
// The no_positions is 16 bit skip over
|
||||
peep_loading_positions += 2;
|
||||
@@ -1528,7 +1528,7 @@ int object_get_scenario_text(rct_object_entry *entry)
|
||||
// Read chunk
|
||||
int chunkSize = *((uint32*)pos);
|
||||
|
||||
char *chunk;
|
||||
uint8 *chunk;
|
||||
if (chunkSize == 0xFFFFFFFF) {
|
||||
chunk = malloc(0x600000);
|
||||
chunkSize = sawyercoding_read_chunk(rw, chunk);
|
||||
@@ -1649,5 +1649,5 @@ char *object_get_name(rct_object_entry *entry)
|
||||
// Skip no of images
|
||||
pos += 4;
|
||||
|
||||
return pos;
|
||||
return (char *)pos;
|
||||
}
|
||||
+1
-1
@@ -108,7 +108,7 @@ int object_get_scenario_text(rct_object_entry *entry);
|
||||
void object_free_scenario_text();
|
||||
int object_get_length(rct_object_entry *entry);
|
||||
int object_entry_compare(const rct_object_entry *a, const rct_object_entry *b);
|
||||
int object_calculate_checksum(const rct_object_entry *entry, const char *data, int dataLength);
|
||||
int object_calculate_checksum(const rct_object_entry *entry, const uint8 *data, int dataLength);
|
||||
int object_paint(int type, int eax, int ebx, int ecx, int edx, int esi, int edi, int ebp);
|
||||
rct_object_entry *object_get_next(rct_object_entry *entry);
|
||||
int write_object_file(SDL_RWops* rw, rct_object_entry* entry);
|
||||
|
||||
+2
-2
@@ -9017,7 +9017,7 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1,
|
||||
RCT2_GLOBAL(0x00F1AEF4, uint16) = sprite_index;
|
||||
}
|
||||
|
||||
uint8* fullText = RCT2_ADDRESS(0x00F1AEF6, uint8);
|
||||
utf8* fullText = RCT2_ADDRESS(0x00F1AEF6, utf8);
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY) {
|
||||
uint8 position = (state - 1) % 3;
|
||||
memcpy(fullText + position * 12, text_1, 4);
|
||||
@@ -9030,7 +9030,7 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1,
|
||||
|
||||
rct_peep* peep = GET_PEEP(sprite_index);
|
||||
RCT2_GLOBAL(0x0013CE952, uint32) = peep->id;
|
||||
uint8* curName = RCT2_ADDRESS(0x00141ED68, uint8);
|
||||
utf8* curName = RCT2_ADDRESS(0x00141ED68, utf8);
|
||||
rct_string_id curId = peep->name_string_idx;
|
||||
format_string(curName, curId, RCT2_ADDRESS(0x0013CE952, void));
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ void platform_get_closest_resolution(int inWidth, int inHeight, int *outWidth, i
|
||||
void platform_init();
|
||||
void platform_draw();
|
||||
void platform_free();
|
||||
void platform_update_palette(char *colours, int start_index, int num_colours);
|
||||
void platform_update_palette(const uint8 *colours, int start_index, int num_colours);
|
||||
void platform_set_fullscreen_mode(int mode);
|
||||
void platform_set_cursor(char cursor);
|
||||
void platform_refresh_video();
|
||||
|
||||
@@ -347,7 +347,7 @@ static uint8 lerp(uint8 a, uint8 b, float t)
|
||||
return (uint8)(a + amount);
|
||||
}
|
||||
|
||||
void platform_update_palette(char* colours, int start_index, int num_colours)
|
||||
void platform_update_palette(const uint8* colours, int start_index, int num_colours)
|
||||
{
|
||||
SDL_Surface *surface;
|
||||
int i;
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ static void sub_69E891();
|
||||
|
||||
bool rct1_read_sc4(const char *path, rct1_s4 *s4)
|
||||
{
|
||||
char *buffer, *decodedBuffer;
|
||||
uint8 *buffer, *decodedBuffer;
|
||||
long length, decodedLength;
|
||||
bool success;
|
||||
|
||||
@@ -97,7 +97,7 @@ bool rct1_read_sc4(const char *path, rct1_s4 *s4)
|
||||
|
||||
bool rct1_read_sv4(const char *path, rct1_s4 *s4)
|
||||
{
|
||||
char *buffer, *decodedBuffer;
|
||||
uint8 *buffer, *decodedBuffer;
|
||||
long length, decodedLength;
|
||||
bool success;
|
||||
|
||||
|
||||
+9
-9
@@ -341,7 +341,7 @@ void track_list_populate(ride_list_item item, uint8* track_list_cache){
|
||||
|
||||
uint8 cur_track_entry_index = 0;
|
||||
for (uint8 track_type = *track_pointer++; track_type != 0xFE;
|
||||
track_pointer += strlen(track_pointer) + 1,
|
||||
track_pointer += strlen((const char *)track_pointer) + 1,
|
||||
track_type = *track_pointer++){
|
||||
rct_object_entry* track_object = (rct_object_entry*)track_pointer;
|
||||
track_pointer += sizeof(rct_object_entry);
|
||||
@@ -379,7 +379,7 @@ void track_list_populate(ride_list_item item, uint8* track_list_cache){
|
||||
uint8 track_entry_index = 0;
|
||||
uint8 isBelow = 0;
|
||||
for (; track_entry_index != cur_track_entry_index; track_entry_index++){
|
||||
if (strcicmp(track_pointer, &RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, uint8)[track_entry_index * 128]) < 0){
|
||||
if (strcicmp((const char *)track_pointer, &RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, const char)[track_entry_index * 128]) < 0){
|
||||
isBelow = 1;
|
||||
break;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ void track_list_populate(ride_list_item item, uint8* track_list_cache){
|
||||
(cur_track_entry_index - track_entry_index) * 128);
|
||||
}
|
||||
|
||||
strcpy(&RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, uint8)[track_entry_index * 128], track_pointer);
|
||||
strcpy(&RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, char)[track_entry_index * 128], (const char *)track_pointer);
|
||||
cur_track_entry_index++;
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ void track_load_list(ride_list_item item)
|
||||
new_file_pointer += sizeof(rct_object_entry);
|
||||
|
||||
int file_name_length = strlen(enumFileInfo.path);
|
||||
strcpy(new_file_pointer, enumFileInfo.path);
|
||||
strcpy((char *)new_file_pointer, enumFileInfo.path);
|
||||
new_file_pointer += file_name_length + 1;
|
||||
}
|
||||
platform_enumerate_files_end(enumFileHandle);
|
||||
@@ -480,7 +480,7 @@ void track_load_list(ride_list_item item)
|
||||
free(track_list_cache);
|
||||
}
|
||||
|
||||
static void copy(void *dst, char **src, int length)
|
||||
static void copy(void *dst, uint8 **src, int length)
|
||||
{
|
||||
memcpy(dst, *src, length);
|
||||
*src += length;
|
||||
@@ -512,7 +512,7 @@ rct_track_td6* load_track_design(const char *path)
|
||||
{
|
||||
SDL_RWops *fp;
|
||||
int fpLength;
|
||||
char *fpBuffer, *decoded, *src;
|
||||
uint8 *fpBuffer, *decoded, *src;
|
||||
int i, decodedLength;
|
||||
uint8* edi;
|
||||
|
||||
@@ -1995,7 +1995,7 @@ int sub_6D2189(int* cost, uint8* ride_id){
|
||||
|
||||
rct_ride* ride = GET_RIDE(*ride_id);
|
||||
|
||||
uint8* ride_name = RCT2_ADDRESS(0x9E3504, uint8);
|
||||
const utf8* ride_name = RCT2_ADDRESS(0x9E3504, const utf8);
|
||||
rct_string_id new_ride_name = user_string_allocate(132, ride_name);
|
||||
|
||||
if (new_ride_name){
|
||||
@@ -2229,7 +2229,7 @@ rct_track_design *track_get_info(int index, uint8** preview)
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_TRACK_DESIGN_INDEX_CACHE, uint32)[i] = index;
|
||||
|
||||
char track_path[MAX_PATH] = { 0 };
|
||||
subsitute_path(track_path, (char*)RCT2_ADDRESS_TRACKS_PATH, trackDesignList + (index * 128));
|
||||
subsitute_path(track_path, (char*)RCT2_ADDRESS_TRACKS_PATH, (char *)trackDesignList + (index * 128));
|
||||
|
||||
rct_track_td6* loaded_track = NULL;
|
||||
|
||||
@@ -2973,7 +2973,7 @@ int save_track_to_file(rct_track_td6* track_design, char* path)
|
||||
|
||||
uint8* track_file = malloc(0x8000);
|
||||
|
||||
int length = sawyercoding_encode_td6((char*)track_design, track_file, 0x609F);
|
||||
int length = sawyercoding_encode_td6((uint8 *)track_design, track_file, 0x609F);
|
||||
|
||||
SDL_RWops *file;
|
||||
|
||||
|
||||
+2
-1
@@ -677,7 +677,8 @@ bool title_refresh_sequence()
|
||||
}
|
||||
}
|
||||
if (hasLoad && (hasWait || !hasRestart) && !hasInvalidSave) {
|
||||
uint8 *src, *scriptPtr, *binaryScript;
|
||||
char *src;
|
||||
uint8 *scriptPtr, *binaryScript;
|
||||
binaryScript = malloc(1024 * 8);
|
||||
scriptPtr = binaryScript;
|
||||
|
||||
|
||||
Reference in new issue
Block a user