More readability, grammar, spelling fixes

This commit is contained in:
CraigCraig 2017-05-15 02:28:43 -05:00 committed by Michael Steenbeek
parent eb868089c8
commit 26287f5a3e
37 changed files with 205 additions and 205 deletions

View File

@ -64,7 +64,7 @@ namespace Imaging
return false;
}
// Setup png reading
// Setup PNG reading
png_set_read_fn(png_ptr, &fs, PngReadData);
png_set_sig_bytes(png_ptr, sig_read);

View File

@ -195,10 +195,10 @@ static void cheat_reset_crash_status()
rct_ride *ride;
FOR_ALL_RIDES(i, ride){
//reset crash status
// Reset crash status
if (ride->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)
ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED;
//reset crash history
// Reset crash history
ride->last_crash_type = RIDE_CRASH_TYPE_NONE;
}
window_invalidate_by_class(WC_RIDE);

View File

@ -712,12 +712,12 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc)
json_decref(sprite_list);
return -1;
}
//Get x and y offsets, if present
// Get x and y offsets, if present
json_t* x_offset = json_object_get(sprite_description, "x_offset");
json_t* y_offset = json_object_get(sprite_description, "y_offset");
//Resolve absolute sprite path
// Resolve absolute sprite path
char *imagePath = platform_get_absolute_path(json_string_value(path), directoryPath);
rct_g1_element spriteElement;

View File

@ -171,7 +171,7 @@ namespace Config
model->load_save_sort = reader->GetSint32("load_save_sort", SORT_NAME_ASCENDING);
model->minimize_fullscreen_focus_loss = reader->GetBoolean("minimize_fullscreen_focus_loss", true);
//Default config setting is false until the games canvas can be separated from the effect
// Default config setting is false until the games canvas can be separated from the effect
model->day_night_cycle = reader->GetBoolean("day_night_cycle", false);
model->enable_light_fx = reader->GetBoolean("enable_light_fx", false);

View File

@ -89,7 +89,7 @@ uint8 gOtherPalette[256] = {
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
};
//Originally 0x9ABE04
// Originally 0x9ABE04
uint8 text_palette[0x8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
@ -314,26 +314,26 @@ const uint16 palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = {
SPR_PALETTE_LIGHT_PINK,
SPR_PALETTE_WATER, // PALETTE_WATER (water)
SPR_PALETTE_WATER, // PALETTE_WATER (water)
SPR_PALETTE_3100,
SPR_PALETTE_3101, // PALETTE_34
SPR_PALETTE_3101, // PALETTE_34
SPR_PALETTE_3102,
SPR_PALETTE_3103,
SPR_PALETTE_3104,
SPR_PALETTE_3106,
SPR_PALETTE_3107,
SPR_PALETTE_3108, // 40
SPR_PALETTE_3108, // 40
SPR_PALETTE_3109,
SPR_PALETTE_3110,
SPR_PALETTE_3105,
SPR_PALETTE_4948,
SPR_PALETTE_4949, // PALETTE_45
SPR_PALETTE_4949, // PALETTE_45
SPR_PALETTE_4950,
SPR_PALETTE_DARKEN_3, // PALETTE_DARKEN_3
SPR_PALETTE_4952, // Decreases contrast
SPR_PALETTE_DARKEN_1, // PALETTE_DARKEN_1
SPR_PALETTE_DARKEN_2, // PALETTE_DARKEN_2 (construction marker)
SPR_PALETTE_4955, // PALETTE_51
SPR_PALETTE_DARKEN_3, // PALETTE_DARKEN_3
SPR_PALETTE_4952, // Decreases contrast
SPR_PALETTE_DARKEN_1, // PALETTE_DARKEN_1
SPR_PALETTE_DARKEN_2, // PALETTE_DARKEN_2 (construction marker)
SPR_PALETTE_4955, // PALETTE_51
SPR_PALETTE_TRANSLUCENT_GREY,
SPR_PALETTE_TRANSLUCENT_GREY_HIGHLIGHT,

View File

@ -66,7 +66,7 @@ typedef struct rct_g1_element_32bit {
sint16 x_offset; // 0x08
sint16 y_offset; // 0x0A
uint16 flags; // 0x0C
uint16 zoomed_offset; // 0x0E
uint16 zoomed_offset; // 0x0E
} rct_g1_element_32bit;
assert_struct_size(rct_g1_element_32bit, 0x10);
@ -102,13 +102,13 @@ typedef enum {
PALETTE_34 = 34,
PALETTE_45 = 45, // Decolorize + lighten
PALETTE_45 = 45, // Decolourise + lighten
PALETTE_DARKEN_3 = 47,
PALETTE_DARKEN_1 = 49,
PALETTE_DARKEN_2 = 50,
PALETTE_51 = 51, // Decolorize + darken
PALETTE_51 = 51, // Decolourise + darken
PALETTE_TRANSLUCENT_GREY = 52,
PALETTE_TRANSLUCENT_GREY_HIGHLIGHT = 53,
PALETTE_TRANSLUCENT_GREY_SHADOW = 54,

View File

@ -47,35 +47,35 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer,
next_dest_pointer += line_width & source_y_start_mask;
height -= zoom_amount & source_y_start_mask;
//For every line in the image
// For every line in the image
for (sint32 i = 0; i < height; i += zoom_amount) {
sint32 y = source_y_start + i;
uint8 i2 = i >> zoom_level;
//The first part of the source pointer is a list of offsets to different lines
//This will move the pointer to the correct source line.
// The first part of the source pointer is a list of offsets to different lines
// This will move the pointer to the correct source line.
const uint8 *next_source_pointer = source_bits_pointer + ((uint16*)source_bits_pointer)[y];
uint8* loop_dest_pointer = next_dest_pointer + line_width * i2;
uint8 last_data_line = 0;
//For every data section in the line
// For every data section in the line
while (!last_data_line) {
const uint8* source_pointer = next_source_pointer;
uint8* dest_pointer = loop_dest_pointer;
sint32 no_pixels = *source_pointer++;
//gap_size is the number of non drawn pixels you require to
//jump over on your destination
// gap_size is the number of non drawn pixels you require to
// jump over on your destination
uint8 gap_size = *source_pointer++;
//The last bit in no_pixels tells you if you have reached the end of a line
// The last bit in no_pixels tells you if you have reached the end of a line
last_data_line = no_pixels & 0x80;
//Clear the last data line bit so we have just the no_pixels
// Clear the last data line bit so we have just the no_pixels
no_pixels &= 0x7f;
//Have our next source pointer point to the next data section
// Have our next source pointer point to the next data section
next_source_pointer = source_pointer + no_pixels;
//Calculates the start point of the image
// Calculates the start point of the image
sint32 x_start = gap_size - source_x_start;
const sint32 x_diff = x_start & ~zoom_mask;
const sint32 x_mask = ~less_or_equal_zero_mask(x_diff);
@ -89,23 +89,23 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer,
dest_pointer += (x_start >> zoom_level) & ~sign;
//If the start is negative we require to remove part of the image.
//This is done by moving the image pointer to the correct position.
// If the start is negative we require to remove part of the image.
// This is done by moving the image pointer to the correct position.
source_pointer -= x_start & sign;
//The no_pixels will be reduced in this operation
// The no_pixels will be reduced in this operation
no_pixels += x_start & sign;
//Reset the start position to zero as we have taken into account all moves
// Reset the start position to zero as we have taken into account all moves
x_start &= ~sign;
sint32 x_end = x_start + no_pixels;
//If the end position is further out than the whole image
//end position then we need to shorten the line again
// If the end position is further out than the whole image
// end position then we need to shorten the line again
const sint32 pixels_till_end = x_end - width;
//Shorten the line
// Shorten the line
no_pixels -= pixels_till_end & ~(less_or_equal_zero_mask(pixels_till_end));
//Finally after all those checks, copy the image onto the drawing surface
//If the image type is not a basic one we require to mix the pixels
// Finally after all those checks, copy the image onto the drawing surface
// If the image type is not a basic one we require to mix the pixels
if (image_type & IMAGE_TYPE_REMAP) {//In the .exe these are all unraveled loops
for (; no_pixels > 0; no_pixels -= zoom_amount, source_pointer += zoom_amount, dest_pointer++) {
uint8 al = *source_pointer;
@ -117,8 +117,8 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer,
*dest_pointer = al;
}
} else if (image_type & IMAGE_TYPE_TRANSPARENT) {//In the .exe these are all unraveled loops
//Doesn't use source pointer ??? mix with background only?
//Not Tested
// Doesn't use source pointer ??? mix with background only?
// Not Tested
for (; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++) {
uint8 pixel = *dest_pointer;

View File

@ -281,7 +281,7 @@ extern "C"
if (image_type & IMAGE_TYPE_REMAP){
assert(palette_pointer != nullptr);
//image with remaps
// Image with remaps
for (; height > 0; height -= zoom_amount){
uint8* next_source_pointer = source_pointer + source_line_width;
uint8* next_dest_pointer = dest_pointer + dest_line_width;
@ -299,10 +299,10 @@ extern "C"
return;
}
//Image is Transparent. It only uses source pointer for
//telling if it needs to be drawn not for colour. Colour provided
//by the palette pointer.
if (image_type & IMAGE_TYPE_TRANSPARENT){//Not tested
// Image is transparent. It only uses source pointer for
// telling if it needs to be drawn not for colour. Colour provided
// by the palette pointer.
if (image_type & IMAGE_TYPE_TRANSPARENT){ // Not tested
assert(palette_pointer != nullptr);
for (; height > 0; height -= zoom_amount){
uint8* next_source_pointer = source_pointer + source_line_width;
@ -323,8 +323,8 @@ extern "C"
return;
}
//Basic bitmap no fancy stuff
if (!(source_image->flags & G1_FLAG_BMP)){//Not tested
// Basic bitmap no fancy stuff
if (!(source_image->flags & G1_FLAG_BMP)){ // Not tested
for (; height > 0; height -= zoom_amount){
uint8* next_source_pointer = source_pointer + source_line_width;
uint8* next_dest_pointer = dest_pointer + dest_line_width;
@ -339,7 +339,7 @@ extern "C"
return;
}
//Basic bitmap with no draw pixels
// Basic bitmap with no draw pixels
for (; height > 0; height -= zoom_amount){
uint8* next_source_pointer = source_pointer + source_line_width;
uint8* next_dest_pointer = dest_pointer + dest_line_width;
@ -455,7 +455,7 @@ extern "C"
return;
}
//Its used super often so we will define it to a separate variable.
// Its used super often so we will define it to a separate variable.
sint32 zoom_level = dpi->zoom_level;
sint32 zoom_mask = 0xFFFFFFFF << zoom_level;
@ -464,9 +464,9 @@ extern "C"
y -= ~zoom_mask;
}
//This will be the height of the drawn image
// This will be the height of the drawn image
sint32 height = g1_source->height;
//This is the start y coordinate on the destination
// This is the start y coordinate on the destination
sint16 dest_start_y = y + g1_source->y_offset;
// For whatever reason the RLE version does not use
@ -481,16 +481,16 @@ extern "C"
sint32 source_start_y = 0;
if (dest_start_y < 0){
//If the destination y is negative reduce the height of the
//image as we will cut off the bottom
// If the destination y is negative reduce the height of the
// image as we will cut off the bottom
height += dest_start_y;
//If the image is no longer visible nothing to draw
// If the image is no longer visible nothing to draw
if (height <= 0){
return;
}
//The source image will start a further up the image
// The source image will start a further up the image
source_start_y -= dest_start_y;
//The destination start is now reset to 0
// The destination start is now reset to 0
dest_start_y = 0;
}
else{
@ -503,33 +503,33 @@ extern "C"
sint32 dest_end_y = dest_start_y + height;
if (dest_end_y > dpi->height){
//If the destination y is outside of the drawing
//image reduce the height of the image
// If the destination y is outside of the drawing
// image reduce the height of the image
height -= dest_end_y - dpi->height;
}
//If the image no longer has anything to draw
// If the image no longer has anything to draw
if (height <= 0)return;
dest_start_y >>= zoom_level;
//This will be the width of the drawn image
// This will be the width of the drawn image
sint32 width = g1_source->width;
//This is the source start x coordinate
// This is the source start x coordinate
sint32 source_start_x = 0;
//This is the destination start x coordinate
// This is the destination start x coordinate
sint16 dest_start_x = ((x + g1_source->x_offset + ~zoom_mask)&zoom_mask) - dpi->x;
if (dest_start_x < 0){
//If the destination is negative reduce the width
//image will cut off the side
// If the destination is negative reduce the width
// image will cut off the side
width += dest_start_x;
//If there is no image to draw
// If there is no image to draw
if (width <= 0){
return;
}
//The source start will also need to cut off the side
// The source start will also need to cut off the side
source_start_x -= dest_start_x;
//Reset the destination to 0
// Reset the destination to 0
dest_start_x = 0;
}
else{
@ -541,27 +541,27 @@ extern "C"
sint32 dest_end_x = dest_start_x + width;
if (dest_end_x > dpi->width){
//If the destination x is outside of the drawing area
//reduce the image width.
// If the destination x is outside of the drawing area
// reduce the image width.
width -= dest_end_x - dpi->width;
//If there is no image to draw.
// If there is no image to draw.
if (width <= 0)return;
}
dest_start_x >>= zoom_level;
uint8* dest_pointer = (uint8*)dpi->bits;
//Move the pointer to the start point of the destination
// Move the pointer to the start point of the destination
dest_pointer += ((dpi->width >> zoom_level) + dpi->pitch) * dest_start_y + dest_start_x;
if (g1_source->flags & G1_FLAG_RLE_COMPRESSION){
//We have to use a different method to move the source pointer for
//rle encoded sprites so that will be handled within this function
// We have to use a different method to move the source pointer for
// rle encoded sprites so that will be handled within this function
gfx_rle_sprite_to_buffer(g1_source->offset, dest_pointer, palette_pointer, dpi, image_type, source_start_y, height, source_start_x, width);
return;
}
uint8* source_pointer = g1_source->offset;
//Move the pointer to the start point of the source
// Move the pointer to the start point of the source
source_pointer += g1_source->width*source_start_y + source_start_x;
if (!(g1_source->flags & G1_FLAG_1)) {
@ -585,7 +585,7 @@ extern "C"
assert(imgColour->flags & G1_FLAG_BMP);
if (dpi->zoom_level != 0) {
// TODO implement other zoom levels (probably not used though)
// TODO: Implement other zoom levels (probably not used though)
assert(false);
return;
}

View File

@ -163,7 +163,7 @@ void update_palette_effects()
rct_water_type* water_type = (rct_water_type*)object_entry_groups[OBJECT_TYPE_WATER].chunks[0];
if (gClimateLightningFlash == 1) {
// change palette to lighter colour during lightning
// Change palette to lighter colour during lightning
sint32 palette = SPR_GAME_PALETTE_DEFAULT;
if ((intptr_t)water_type != -1) {
@ -182,7 +182,7 @@ void update_palette_effects()
gClimateLightningFlash++;
} else {
if (gClimateLightningFlash == 2) {
// change palette back to normal after lightning
// Change palette back to normal after lightning
sint32 palette = SPR_GAME_PALETTE_DEFAULT;
if ((intptr_t)water_type != -1) {
@ -200,7 +200,7 @@ void update_palette_effects()
}
}
// animate the water/lava/chain movement palette
// Animate the water/lava/chain movement palette
uint32 shade = 0;
if (gConfigGeneral.render_weather_gloom) {
uint8 gloom = gClimateCurrentWeatherGloom;
@ -294,7 +294,7 @@ void game_update()
if (network_get_mode() == NETWORK_MODE_CLIENT && network_get_status() == NETWORK_STATUS_CONNECTED && network_get_authstatus() == NETWORK_AUTH_OK) {
if (network_get_server_tick() - gCurrentTicks >= 10) {
// make sure client doesn't fall behind the server too much
// Make sure client doesn't fall behind the server too much
numUpdates += 10;
}
}
@ -372,7 +372,7 @@ void game_logic_update()
network_update();
if (network_get_mode() == NETWORK_MODE_CLIENT && network_get_status() == NETWORK_STATUS_CONNECTED && network_get_authstatus() == NETWORK_AUTH_OK) {
if (gCurrentTicks >= network_get_server_tick()) {
// don't run past the server
// Don't run past the server
return;
}
}
@ -426,7 +426,7 @@ void game_logic_update()
window_error_open(title_text, body_text);
}
// start autosave timer after update
// Start autosave timer after update
if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE)
gLastAutoSaveUpdate = platform_get_ticks();
}
@ -584,7 +584,7 @@ sint32 game_do_command_p(sint32 command, sint32 *eax, sint32 *ebx, sint32 *ecx,
network_add_player_money_spent(network_get_current_player_id(), cost);
}
// start autosave timer after game command
// Start autosave timer after game command
if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE)
gLastAutoSaveUpdate = platform_get_ticks();
@ -1017,7 +1017,7 @@ static void limit_autosave_count(const size_t numberOfFilesToKeep, bool processL
qsort (autosaveFiles, autosavesCount, sizeof (char*), compare_autosave_file_paths);
// calculate how many saves we need to delete.
// Calculate how many saves we need to delete.
numAutosavesToDelete = autosavesCount - numberOfFilesToKeep;
i=0;
@ -1047,7 +1047,7 @@ void game_autosave()
saveFlags |= 2;
}
// retrieve current time
// Retrieve current time
rct2_date currentDate;
platform_get_date_local(&currentDate);
rct2_time currentTime;

View File

@ -89,7 +89,7 @@ const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = {
{ "ru-RU", "Russian", "Russian", FONT(&TTFFontArial), RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_RUSSIAN
{ "cs-CZ", "Czech", "Czech", FONT(&TTFFontArial), RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_CZECH
{ "ja-JP", "Japanese", "Japanese", FONT(&TTFFontMSGothic), RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_JAPANESE
{ "nb-NO", "Norwegian", "Norsk", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_NORWEGIAN
{ "nb-NO", "Norwegian", "Norsk", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_NORWEGIAN
{ "ca-ES", "Catalan", u8"Català", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_SPANISH }, // LANGUAGE_CATALAN
};

View File

@ -113,16 +113,16 @@ void chat_draw(rct_drawpixelinfo * dpi)
if (_chatTop < 50) {
_chatTop = 50;
} else if (_chatHeight < 150) { //Min height
} else if (_chatHeight < 150) { // Min height
_chatTop = _chatBottom - 150;
_chatHeight = 150;
}
gfx_set_dirty_blocks(_chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5); //Background area + Textbox
gfx_filter_rect(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, PALETTE_51); //Opaque gray background
gfx_set_dirty_blocks(_chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5); // Background area + Textbox
gfx_filter_rect(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, PALETTE_51); // Opaque gray background
gfx_fill_rect_inset(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, chatBackgroundColor, INSET_RECT_FLAG_FILL_NONE);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatTop - 4, _chatRight - 1, _chatBottom - inputLineHeight - 6, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatBottom - inputLineHeight - 5, _chatRight - 1, _chatBottom + 4, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET); //Textbox
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatBottom - inputLineHeight - 5, _chatRight - 1, _chatBottom + 4, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET); // Textbox
}
sint32 x = _chatLeft + 5;
@ -158,7 +158,7 @@ void chat_draw(rct_drawpixelinfo * dpi)
inputLineHeight = gfx_draw_string_left_wrapped(dpi, (void*)&lineCh, x, y + 3, _chatWidth - 10, STR_STRING, TEXT_COLOUR_255);
gfx_set_dirty_blocks(x, y, x + _chatWidth, y + inputLineHeight + 15);
//TODO: Show caret if the input text have multiple lines
// TODO: Show caret if the input text has multiple lines
if (_chatCaretTicks < 15 && gfx_get_string_width(lineBuffer) < (_chatWidth - 10)) {
memcpy(lineBuffer, _chatCurrentLine, gTextInput.selection_offset);
lineBuffer[gTextInput.selection_offset] = 0;
@ -232,7 +232,7 @@ sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, si
sint32 expectedY = y - (numLines * lineHeight);
if (expectedY < 50) {
return (numLines * lineHeight); //Skip drawing, return total height.
return (numLines * lineHeight); // Skip drawing, return total height.
}
lineY = y;

View File

@ -857,8 +857,8 @@ static sint32 cc_set(const utf8 **argv, sint32 argc)
bool run_get_money = true;
if (gCashEncrypted != ENCRYPT_MONEY(money)) {
if (game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETMONEY, money, GAME_COMMAND_CHEAT, 0, 0) != MONEY32_UNDEFINED) {
//When in networked client mode, console_execute_silent("get money")
//does not print value accurately. Instead, print the argument.
// When in networked client mode, console_execute_silent("get money")
// does not print value accurately. Instead, print the argument.
if (network_get_mode() == NETWORK_MODE_CLIENT) {
run_get_money = false;
console_printf("money %d.%d0", money / 10, money % 10);
@ -1025,8 +1025,8 @@ static sint32 cc_set(const utf8 **argv, sint32 argc)
else if (strcmp(argv[0], "cheat_sandbox_mode") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
if (gCheatsSandboxMode != (int_val[0] != 0)) {
if (game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SANDBOXMODE, (int_val[0] != 0), GAME_COMMAND_CHEAT, 0, 0) != MONEY32_UNDEFINED) {
//Change it locally so it shows the accurate value in the
//"console_execute_silent("get cheat_sandbox_mode")" line when in network client mode
// Change it locally so it shows the accurate value in the
// "console_execute_silent("get cheat_sandbox_mode")" line when in networked client mode
gCheatsSandboxMode = (int_val[0] != 0);
}
else {
@ -1038,8 +1038,8 @@ static sint32 cc_set(const utf8 **argv, sint32 argc)
else if (strcmp(argv[0], "cheat_disable_clearance_checks") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
if (gCheatsDisableClearanceChecks != (int_val[0] != 0)) {
if (game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_DISABLECLEARANCECHECKS, (int_val[0] != 0), GAME_COMMAND_CHEAT, 0, 0) != MONEY32_UNDEFINED) {
//Change it locally so it shows the accurate value in the
//"console_execute_silent("get cheat_disable_clearance_checks")" line when in network client mode
// Change it locally so it shows the accurate value in the
// "console_execute_silent("get cheat_disable_clearance_checks")" line when in networked client mode
gCheatsDisableClearanceChecks = (int_val[0] != 0);
}
else {
@ -1051,8 +1051,8 @@ static sint32 cc_set(const utf8 **argv, sint32 argc)
else if (strcmp(argv[0], "cheat_disable_support_limits") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
if (gCheatsDisableSupportLimits != (int_val[0] != 0)) {
if (game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_DISABLESUPPORTLIMITS, (int_val[0] != 0), GAME_COMMAND_CHEAT, 0, 0) != MONEY32_UNDEFINED) {
//Change it locally so it shows the accurate value in the
//"console_execute_silent("get cheat_disable_support_limits")" line when in network client mode
// Change it locally so it shows the accurate value in the
// "console_execute_silent("get cheat_disable_support_limits")" line when in networked client mode
gCheatsDisableSupportLimits = (int_val[0] != 0);
}
else {
@ -1080,7 +1080,7 @@ static sint32 cc_twitch(const utf8 **argv, sint32 argc)
#ifdef DISABLE_TWITCH
console_writeline_error("OpenRCT2 build not compiled with Twitch integration.");
#else
// TODO add some twitch commands
// TODO: Add some twitch commands
#endif
return 0;
}

View File

@ -34,11 +34,11 @@ typedef enum {
CURRENCY_WON, // South Korean Won
CURRENCY_ROUBLE, // Russian Rouble
CURRENCY_CZECH_KORUNA, // Czech koruna
CURRENCY_HKD, // Hong Kong Dollar
CURRENCY_TWD, // New Taiwan Dollar
CURRENCY_YUAN, // Chinese Yuan
CURRENCY_HKD, // Hong Kong Dollar
CURRENCY_TWD, // New Taiwan Dollar
CURRENCY_YUAN, // Chinese Yuan
CURRENCY_CUSTOM, // Custom currency
CURRENCY_CUSTOM, // Custom currency
CURRENCY_END // Last item
} CURRENCY_TYPE;

View File

@ -93,7 +93,7 @@ enum {
FORMAT_PALESILVER,
FORMAT_COLOUR_CODE_END = FORMAT_PALESILVER,
// Extra non-ascii characters
// Extra non-ASCII characters
FORMAT_AMINUSCULE = 159,
FORMAT_CENT = 162,
FORMAT_POUND = 163,
@ -125,7 +125,7 @@ enum {
FORMAT_TICK = 10003,
FORMAT_CROSS = 10005,
// Format codes that need suitable unicode allocations
// Format codes that need suitable Unicode allocations
FORMAT_SYMBOL_i = 20000,
FORMAT_SYMBOL_RAILWAY = 20001,
FORMAT_SYMBOL_ROAD = 20002,

View File

@ -71,12 +71,12 @@ const rct_string_id ResearchFundingLevelNames[] = {
};
const rct_string_id MarketingCampaignNames[ADVERTISING_CAMPAIGN_COUNT][3] = {
{ STR_MARKETING_VOUCHERS_FOR_FREE_ENTRY_TO_THE_PARK, STR_VOUCHERS_FOR_FREE_ENTRY_TO, STR_MARKETING_FINISHED_FREE_ENTRY }, // ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE,
{ STR_MARKETING_VOUCHERS_FOR_FREE_ENTRY_TO_THE_PARK, STR_VOUCHERS_FOR_FREE_ENTRY_TO, STR_MARKETING_FINISHED_FREE_ENTRY }, // ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE,
{ STR_MARKETING_VOUCHERS_FOR_FREE_RIDES_ON_A_PARTICULAR_RIDE, STR_VOUCHERS_FOR_FREE_RIDE_ON, STR_MARKETING_FINISHED_FREE_RIDES }, // ADVERTISING_CAMPAIGN_RIDE_FREE,
{ STR_MARKETING_VOUCHERS_FOR_HALF_PRICE_ENTRY_TO_THE_PARK, STR_VOUCHERS_FOR_HALF_PRICE_ENTRY_TO, STR_MARKETING_FINISHED_HALF_PRICE_ENTRY }, // ADVERTISING_CAMPAIGN_PARK_ENTRY_HALF_PRICE,
{ STR_MARKETING_VOUCHERS_FOR_FREE_FOOD_OR_DRINK, STR_VOUCHERS_FOR_FREE, STR_MARKETING_FINISHED_FREE_RIDE }, // ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE,
{ STR_MARKETING_ADVERTISING_CAMPAIGN_FOR_THE_PARK, STR_ADVERTISING_CAMPAIGN_FOR_1, STR_MARKETING_FINISHED_PARK_ADS }, // ADVERTISING_CAMPAIGN_PARK,
{ STR_MARKETING_ADVERTISING_CAMPAIGN_FOR_A_PARTICULAR_RIDE, STR_ADVERTISING_CAMPAIGN_FOR_2, STR_MARKETING_FINISHED_RIDE_ADS }, // ADVERTISING_CAMPAIGN_RIDE,
{ STR_MARKETING_VOUCHERS_FOR_FREE_FOOD_OR_DRINK, STR_VOUCHERS_FOR_FREE, STR_MARKETING_FINISHED_FREE_RIDE }, // ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE,
{ STR_MARKETING_ADVERTISING_CAMPAIGN_FOR_THE_PARK, STR_ADVERTISING_CAMPAIGN_FOR_1, STR_MARKETING_FINISHED_PARK_ADS }, // ADVERTISING_CAMPAIGN_PARK,
{ STR_MARKETING_ADVERTISING_CAMPAIGN_FOR_A_PARTICULAR_RIDE, STR_ADVERTISING_CAMPAIGN_FOR_2, STR_MARKETING_FINISHED_RIDE_ADS }, // ADVERTISING_CAMPAIGN_RIDE,
};
const rct_string_id RideInspectionIntervalNames[] = {
@ -411,7 +411,7 @@ static void format_integer(char **dest, size_t *size, sint64 value)
nend = (*dest) - 1;
reverse_string();
format_push_char_safe('\0'); // truncate overflowed string
format_push_char_safe('\0'); // Truncate overflowed string
} else {
// Reverse string
nend = (*dest) - 1;
@ -494,7 +494,7 @@ static void format_comma_separated_integer(char **dest, size_t *size, sint64 val
nend = (*dest) - 1;
reverse_string();
format_push_char_safe('\0'); // truncate overflowed string
format_push_char_safe('\0'); // Truncate overflowed string
} else {
// Reverse string
nend = *dest - 1;
@ -587,7 +587,7 @@ static void format_comma_separated_fixed_1dp(char **dest, size_t *size, sint64 v
nend = (*dest) - 1;
reverse_string();
format_push_char_safe('\0'); // truncate overflowed string
format_push_char_safe('\0'); // Truncate overflowed string
} else {
// Reverse string
nend = *dest - 1;
@ -686,7 +686,7 @@ static void format_comma_separated_fixed_2dp(char **dest, size_t *size, sint64 v
nend = (*dest) - 1;
reverse_string();
format_push_char_safe('\0'); // truncate overflowed string
format_push_char_safe('\0'); // Truncate overflowed string
} else {
// Reverse string
nend = *dest - 1;
@ -708,7 +708,7 @@ static void format_currency(char **dest, size_t *size, sint64 value)
value = -value;
}
//Round the value away from zero
// Round the value away from zero
value = (value + 99) / 100;
// Currency symbol
@ -1217,7 +1217,7 @@ money32 string_to_money(char * string_to_monetise)
const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT);
char * text_ptr = string_to_monetise;
int i, j, sign;
//Remove everything except numbers decimal, and minus sign(s)
// Remove everything except numbers decimal, and minus sign(s)
for (i = 0; text_ptr[i] != '\0'; ++i) {
while (!(
(text_ptr[i] >= '0' && text_ptr[i] <= '9') ||
@ -1225,7 +1225,7 @@ money32 string_to_money(char * string_to_monetise)
(text_ptr[i] == '-') ||
(text_ptr[i] == '\0')
)) {
//move everything over to the left by one
// Move everything over to the left by one
for (j = i; text_ptr[j] != '\0'; ++j) {
text_ptr[j] = text_ptr[j + 1];
}
@ -1233,7 +1233,7 @@ money32 string_to_money(char * string_to_monetise)
}
}
//if first character of shortened string is a minus, consider number negative
// If first character of shortened string is a minus, consider number negative
if (text_ptr[0] == '-') {
sign = -1;
}
@ -1241,7 +1241,7 @@ money32 string_to_money(char * string_to_monetise)
sign = 1;
}
//now minus signs can be removed from string
// Now minus signs can be removed from string
for (i = 0; text_ptr[i] != '\0'; ++i) {
if (text_ptr[i] == '-') {
for (j = i; text_ptr[j] != '\0'; ++j) {
@ -1251,8 +1251,8 @@ money32 string_to_money(char * string_to_monetise)
}
}
//Due to the nature of strstr and strtok, decimals at the very beginning will be ignored, causing
//".1" to be interpreted as "1". To prevent this, prefix with "0" if decimal is at the beginning.
// Due to the nature of strstr and strtok, decimals at the very beginning will be ignored, causing
// ".1" to be interpreted as "1". To prevent this, prefix with "0" if decimal is at the beginning.
char * buffer = (char *)malloc(strlen(string_to_monetise) + 4);
if (string_to_monetise[0] == decimal_char[0]) {
strcpy(buffer, "0");
@ -1264,7 +1264,7 @@ money32 string_to_money(char * string_to_monetise)
int number = 0, decimal = 0;
if (strstr(buffer, decimal_char) == NULL) {
//if decimal char does not exist, no tokenising is needed.
// If decimal char does not exist, no tokenising is needed.
number = atoi(buffer);
}
else {
@ -1274,16 +1274,16 @@ money32 string_to_money(char * string_to_monetise)
if (numberText != NULL) number = atoi(numberText);
if (decimalText != NULL) decimal = atoi(decimalText);
//The second parameter in MONEY must be two digits in length, while the game only ever uses
//the first of the two digits.
//Convert invalid numbers, such as ".6", ".234", ".05", to ".60", ".20", ".00" (respectively)
// The second parameter in MONEY must be two digits in length, while the game only ever uses
// the first of the two digits.
// Convert invalid numbers, such as ".6", ".234", ".05", to ".60", ".20", ".00" (respectively)
while (decimal > 10) decimal /= 10;
if (decimal < 10) decimal *= 10;
}
free(buffer);
money32 result = MONEY(number, decimal);
//check if MONEY resulted in overflow
// Check if MONEY resulted in overflow
if ((number > 0 && result < 0) || result / 10 < number) {
result = INT_MAX;
}
@ -1299,14 +1299,14 @@ void money_to_string(money32 amount, char * buffer_to_put_value_to, size_t buffe
}
int sign = amount >= 0 ? 1 : -1;
int a = abs(amount);
if (a / 10 > 0 && a % 10 > 0) { // if whole and decimal exist
if (a / 10 > 0 && a % 10 > 0) { // If whole and decimal exist
const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT);
snprintf(buffer_to_put_value_to, buffer_len, "%d%s%d0", (a / 10) * sign, decimal_char, a % 10);
}
else if (a / 10 > 0 && a % 10 == 0) { // if whole exists, but not decimal
else if (a / 10 > 0 && a % 10 == 0) { // If whole exists, but not decimal
snprintf(buffer_to_put_value_to, buffer_len, "%d", (a / 10) * sign);
}
else if (a / 10 == 0 && a % 10 > 0) { //if decimal exists, but not whole
else if (a / 10 == 0 && a % 10 > 0) { // If decimal exists, but not whole
const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT);
snprintf(buffer_to_put_value_to, buffer_len, "%s0%s%d0", sign < 0 ? "-" : "", decimal_char, a % 10);
}
@ -1359,7 +1359,7 @@ sint32 win1252_to_utf8(utf8string dst, const char *src, size_t srcLength, size_t
log_error("Unsupported conversion from %s to %s, errno = %d", from_charset, to_charset, error);
break;
default:
log_error("Unknown error while initializing iconv, errno = %d", error);
log_error("Unknown error while initialising iconv, errno = %d", error);
}
return 0;
}

View File

@ -180,7 +180,7 @@ void finance_reset_history()
*/
void finance_init() {
// It only initializes the first month
// It only initialises the first month
for (uint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) {
gExpenditureTable[i] = 0;
}

View File

@ -62,7 +62,7 @@ void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element)
uint32 base_id = (direction << 1) + banner_scenery->image;
uint32 image_id = base_id;
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST)//if being placed
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST) // if being placed
{
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
image_id |= construction_markers[gConfigGeneral.construction_marker_colour];

View File

@ -174,7 +174,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
dword_141F710 = construction_markers[gConfigGeneral.construction_marker_colour];
}
// save map_element
// Save map_element
uint8 ah = sceneryEntry->wall.height * 8 - 2;

View File

@ -110,20 +110,20 @@
// the new C modules or changed behaviour of code that used them.
#define RCT2_ADDRESS_RIDE_FLAGS 0x0097CF40
#define RCT2_ADDRESS_Y_RELATED_GLOBAL_1 0x9E3D12 //uint16
#define RCT2_ADDRESS_Y_END_POINT_GLOBAL 0x9ABDAC //sint16
#define RCT2_ADDRESS_Y_START_POINT_GLOBAL 0xEDF808 //sint16
#define RCT2_ADDRESS_X_RELATED_GLOBAL_1 0x9E3D10 //uint16
#define RCT2_ADDRESS_X_END_POINT_GLOBAL 0x9ABDA8 //sint16
#define RCT2_ADDRESS_X_START_POINT_GLOBAL 0xEDF80C //sint16
#define RCT2_ADDRESS_DPI_LINE_LENGTH_GLOBAL 0x9ABDB0 //uint16 width+pitch
#define RCT2_ADDRESS_Y_RELATED_GLOBAL_1 0x9E3D12 // uint16
#define RCT2_ADDRESS_Y_END_POINT_GLOBAL 0x9ABDAC // sint16
#define RCT2_ADDRESS_Y_START_POINT_GLOBAL 0xEDF808 // sint16
#define RCT2_ADDRESS_X_RELATED_GLOBAL_1 0x9E3D10 // uint16
#define RCT2_ADDRESS_X_END_POINT_GLOBAL 0x9ABDA8 // sint16
#define RCT2_ADDRESS_X_START_POINT_GLOBAL 0xEDF80C // sint16
#define RCT2_ADDRESS_DPI_LINE_LENGTH_GLOBAL 0x9ABDB0 // uint16 width+pitch
#define RCT2_ADDRESS_LAND_TOOL_SIZE 0x009A9800
#define RCT2_ADDRESS_SAVE_PROMPT_MODE 0x009A9802
#define RCT2_ADDRESS_MAP_TOOLTIP_ARGS 0x009A9808
#define RCT2_ADDRESS_CONFIG_FIRST_TIME_LOAD_OBJECTS 0x009AA00D
#define RCT2_ADDRESS_CONFIG_FIRST_TIME_LOAD_CONFIG 0x009AB4C6
#define RCT2_ADDRESS_SCENARIO_TEXT_TEMP_CHUNK 0x009ADAF8
#define RCT2_ADDRESS_NAUSEA_THRESHOLDS 0x00982390 //uint16
#define RCT2_ADDRESS_NAUSEA_THRESHOLDS 0x00982390 // uint16
// An array of pointers to the start of a way to
// translate between scroll positions for drawing

View File

@ -77,19 +77,19 @@ static void paint_circus_show(uint8 rideIndex, uint8 trackSequence, uint8 direct
sint32 cornerSegments = 0;
switch (trackSequence) {
case 1:
// top
// Top
cornerSegments = SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC;
break;
case 3:
// right
// Right
cornerSegments = SEGMENT_CC | SEGMENT_BC | SEGMENT_D4;
break;
case 6:
// left
// Left
cornerSegments = SEGMENT_C8 | SEGMENT_B8 | SEGMENT_D0;
break;
case 7:
// bottom
// Bottom
cornerSegments = SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4;
break;
}

View File

@ -31,7 +31,7 @@ rct_crooked_house_bound_box crooked_house_data[] = {
{6, 0, 42, 24},
{0, 0, 0, 0},
{-16, -16, 32, 32},
{0, 0, 0, 0}, // unused
{0, 0, 0, 0}, // Unused
{0, 6, 24, 42}
};
@ -81,28 +81,28 @@ static void paint_crooked_house(uint8 rideIndex, uint8 trackSequence, uint8 dire
switch(trackSequence) {
case 3: sub_88ABA4(direction, 32, 224, 0, height); break;
//case 5: sub_88ABA4(direction, 0, 224, 1, height); break;
// case 5: sub_88ABA4(direction, 0, 224, 1, height); break;
case 6: sub_88ABA4(direction, 224, 32, 4, height); break;
case 7: sub_88ABA4(direction, 224, 224, 2, height); break;
//case 8: sub_88ABA4(rideIndex, 224, 0, 3, height); break;
// case 8: sub_88ABA4(rideIndex, 224, 0, 3, height); break;
}
sint32 cornerSegments = 0;
switch (trackSequence) {
case 1:
// top
// Top
cornerSegments = SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC;
break;
case 3:
// right
// Right
cornerSegments = SEGMENT_CC | SEGMENT_BC | SEGMENT_D4;
break;
case 6:
// left
// Left
cornerSegments = SEGMENT_C8 | SEGMENT_B8 | SEGMENT_D0;
break;
case 7:
// bottom
// Bottom
cornerSegments = SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4;
break;
}

View File

@ -64,7 +64,7 @@ static void paint_dodgems(uint8 rideIndex, uint8 trackSequence, uint8 direction,
switch (direction) {
case 2:
trackSequence = 15 - trackSequence;
// fallthrough
// Fallthrough
case 0:
if ((trackSequence / 4) & 1) {
paint_dodgems_roof(height + 30, 0);
@ -75,7 +75,7 @@ static void paint_dodgems(uint8 rideIndex, uint8 trackSequence, uint8 direction,
case 3:
trackSequence = 15 - trackSequence;
// fallthrough
// Fallthrough
case 1:
if ((trackSequence / 4) & 1) {
paint_dodgems_roof(height + 30, 1);

View File

@ -2659,7 +2659,7 @@ rct_peep *find_closest_mechanic(sint32 x, sint32 y, sint32 forInspection)
if (peep->x == MAP_LOCATION_NULL)
continue;
// manhattan distance
// Manhattan distance
distance = abs(peep->x - x) + abs(peep->y - y);
if (distance < closestDistance) {
closestDistance = distance;
@ -2693,7 +2693,7 @@ rct_peep *ride_get_assigned_mechanic(rct_ride *ride)
#define MAKE_TUNEID_LIST(...) (uint8[]){(countof(((uint8[]){__VA_ARGS__}))), __VA_ARGS__}
//0x009AEF28
// 0x009AEF28
uint8 *ride_music_style_tuneids[] = {
MAKE_TUNEID_LIST(13), // MUSIC_STYLE_DODGEMS_BEAT
MAKE_TUNEID_LIST(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), // MUSIC_STYLE_FAIRGROUND_ORGAN

View File

@ -77,7 +77,7 @@ enum
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NW_NE = 20801,
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NE_SE = 20802,
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SE_SW = 20803,
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SW_NW = 20804, // empty
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SW_NW = 20804, // Empty
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NW_NE = 20805,
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NE_SE = 20806,
SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SE_SW = 20807,

View File

@ -206,7 +206,7 @@ static void paint_log_flume_track_station(uint8 rideIndex, uint8 trackSequence,
}
track_paint_util_draw_station_3(rideIndex, trackSequence, direction, height + 2, height, mapElement);
// covers shouldn't be offset by +2
// Covers shouldn't be offset by +2
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);

View File

@ -63,15 +63,15 @@ static const rct_string_id BannerColouredTextFormats[] = {
};
rct_widget window_banner_widgets[] = {
{ WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, 0xFFFFFFFF, STR_NONE}, // panel / background
{ WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, 0xFFFFFFFF, STR_NONE}, // panel / background
{ WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_BANNER_WINDOW_TITLE, STR_WINDOW_TITLE_TIP}, // title bar
{ WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, // close x button
{ WWT_VIEWPORT, 1, 3, WW - 26,17, WH - 20, 0x0FFFFFFFE, STR_NONE}, // tab content panel
{ WWT_VIEWPORT, 1, 3, WW - 26,17, WH - 20, 0x0FFFFFFFE, STR_NONE}, // tab content panel
{ WWT_FLATBTN, 1, WW - 25, WW - 2, 19, 42, SPR_RENAME, STR_CHANGE_BANNER_TEXT_TIP}, // change banner button
{ WWT_FLATBTN, 1, WW - 25, WW - 2, 43, 66, SPR_NO_ENTRY, STR_SET_AS_NO_ENTRY_BANNER_TIP}, // no entry button
{ WWT_FLATBTN, 1, WW - 25, WW - 2, 67, 90, SPR_DEMOLISH, STR_DEMOLISH_BANNER_TIP}, // demolish button
{ WWT_COLOURBTN, 1, 5, 16, WH - 16,WH - 5, 0xFFFFFFFF, STR_SELECT_MAIN_SIGN_COLOUR_TIP}, // high money
{ WWT_DROPDOWN, 1, 43, 81, WH - 16,WH - 5, 0xFFFFFFFF, STR_NONE}, // high money
{ WWT_DROPDOWN, 1, 43, 81, WH - 16,WH - 5, 0xFFFFFFFF, STR_NONE}, // high money
{ WWT_DROPDOWN_BUTTON, 1, 70, 80, WH - 15,WH - 6, STR_DROPDOWN_GLYPH, STR_SELECT_TEXT_COLOUR_TIP}, // high money
{ WIDGETS_END },
};
@ -239,7 +239,7 @@ static void window_banner_mousedown(rct_widgetindex widgetIndex, rct_window*w, r
gDropdownItemsArgs[i] = BannerColouredTextFormats[i + 1];
}
//Switch to the dropdown box widget.
// Switch to the dropdown box widget.
widget--;
window_dropdown_show_text_custom_width(
@ -306,7 +306,7 @@ static void window_banner_invalidate(rct_window *w)
rct_widget* colour_btn = &window_banner_widgets[WIDX_MAIN_COLOUR];
colour_btn->type = WWT_EMPTY;
//scenery item not sure why we use this instead of banner?
// Scenery item not sure why we use this instead of banner?
rct_scenery_entry* sceneryEntry = get_banner_entry(banner->type);
if (sceneryEntry->banner.flags & 1) colour_btn->type = WWT_COLOURBTN;

View File

@ -45,7 +45,7 @@ rct_widget window_changelog_widgets[] = {
{ WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_CHANGELOG_TITLE, STR_WINDOW_TITLE_TIP }, // title bar
{ WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button
{ WWT_RESIZE, 1, 0, WW - 1, 14, WH - 1, 0xFFFFFFFF, STR_NONE }, // content panel
{ WWT_SCROLL, 1, 3, WW - 3, 16, WH - 15, SCROLL_BOTH, STR_NONE }, // scroll area
{ WWT_SCROLL, 1, 3, WW - 3, 16, WH - 15, SCROLL_BOTH, STR_NONE }, // scroll area
{ WIDGETS_END },
};

View File

@ -176,7 +176,7 @@ enum WINDOW_CHEATS_WIDGET_IDX {
#define MAX_BTN_LEFT ((sint16)(XPL(1.5)))
#define MAX_BTN_RIGHT ((sint16)(WPL(1)))
#define TXTO 3 //text horizontal offset from button left (for button text)
#define TXTO 3 // Text horizontal offset from button left (for button text)
#pragma endregion
#define MAIN_CHEATS_WIDGETS \
@ -261,7 +261,7 @@ static rct_widget window_cheats_misc_widgets[] = {
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(13), HPL(13), STR_CHEAT_WATER_PLANTS, STR_NONE }, // Water plants
{ WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(13), HPL(13), STR_CHEAT_FIX_VANDALISM, STR_NONE }, // Fix vandalism
{ WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(14), HPL(14), STR_CHEAT_REMOVE_LITTER, STR_NONE }, // Remove litter
{ WWT_CHECKBOX, 1, XPL(0), WPL(0), YPL(15), HPL(15), STR_CHEAT_DISABLE_PLANT_AGING, STR_CHEAT_DISABLE_PLANT_AGING_TIP }, // Disable plant aging
{ WWT_CHECKBOX, 1, XPL(0), WPL(0), YPL(15), HPL(15), STR_CHEAT_DISABLE_PLANT_AGING, STR_CHEAT_DISABLE_PLANT_AGING_TIP }, // Disable plant ageing
{ WWT_CLOSEBOX, 1, MAX_BTN_LEFT, MAX_BTN_RIGHT, YPL(16), HPL(16), STR_FAST, STR_NONE }, // Fast staff
{ WWT_CLOSEBOX, 1, MIN_BTN_LEFT, MIN_BTN_RIGHT, YPL(16), HPL(16), STR_NORMAL, STR_NONE }, // Normal staff
{ WIDGETS_END },
@ -736,7 +736,7 @@ static void window_cheats_misc_mouseup(rct_window *w, rct_widgetindex widgetInde
case WIDX_SANDBOX_MODE:
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SANDBOXMODE, !gCheatsSandboxMode, GAME_COMMAND_CHEAT, 0, 0);
// To prevent tools from staying active after disabling cheat
//tool_cancel();
// tool_cancel();
break;
case WIDX_RESET_DATE:
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_RESETDATE, 0, GAME_COMMAND_CHEAT, 0, 0);

View File

@ -65,7 +65,7 @@ static void window_editor_bottom_toolbar_jump_forward_to_save_scenario();
static rct_window_event_list window_editor_bottom_toolbar_events = {
NULL,
window_editor_bottom_toolbar_mouseup, //0x0066f5ae,
window_editor_bottom_toolbar_mouseup, // 0x0066f5ae,
NULL,
NULL,
NULL,
@ -89,8 +89,8 @@ static rct_window_event_list window_editor_bottom_toolbar_events = {
NULL,
NULL,
NULL,
window_editor_bottom_toolbar_invalidate, //0x0066f1c9,
window_editor_bottom_toolbar_paint, //0x0066f25c,
window_editor_bottom_toolbar_invalidate, // 0x0066f1c9,
window_editor_bottom_toolbar_paint, // 0x0066f25c,
NULL
};

View File

@ -49,7 +49,7 @@ static rct_window_event_list window_editor_main_events = {
NULL,
NULL,
NULL,
window_editor_main_paint,// 0x0066FC97, //window_editor_main_paint,
window_editor_main_paint,// 0x0066FC97, // window_editor_main_paint,
NULL,
};

View File

@ -913,7 +913,7 @@ void window_editor_object_selection_mousedown(rct_widgetindex widgetIndex, rct_w
gDropdownItemsArgs[DDIX_FILTER_WW] = STR_OBJECT_FILTER_WW;
gDropdownItemsArgs[DDIX_FILTER_TT] = STR_OBJECT_FILTER_TT;
gDropdownItemsArgs[DDIX_FILTER_CUSTOM] = STR_OBJECT_FILTER_CUSTOM;
//Track manager cannot select multiple, so only show selection filters if not in track manager
// Track manager cannot select multiple, so only show selection filters if not in track manager
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
num_items = 7;
gDropdownItemsFormat[DDIX_FILTER_SEPERATOR] = 0;
@ -1014,7 +1014,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint3
window_close_all();
//window_close(w);
//This function calls window_track_list_open
// This function calls window_track_list_open
window_editor_object_selection_manage_tracks();
return;
}

View File

@ -72,23 +72,23 @@ enum WINDOW_GUEST_WIDGET_IDX {
validate_global_widx(WC_PEEP, WIDX_ACTION_LBL);
rct_widget window_guest_overview_widgets[] = {
{WWT_FRAME, 0, 0, 191, 0, 156, 0xFFFFFFFF, STR_NONE}, // Panel / Background
{WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, // Title
{WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, // Close x button
{WWT_RESIZE, 1, 0, 191, 43, 156, 0xFFFFFFFF, STR_NONE}, // Resize
{WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, // Tab 1
{WWT_TAB, 1, 73, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, // Tab 2
{WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, // Tab 3
{WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, // Tab 4
{WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, // Tab 5
{WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, // Tab 6
{WWT_12, 1, 3, 166, 45, 56, 0xFFFFFFFF, STR_NONE}, // Label Thought marquee
{WWT_VIEWPORT, 1, 3, 166, 57, 143, 0xFFFFFFFF, STR_NONE}, // Viewport
{WWT_12, 1, 3, 166, 144, 154, 0xFFFFFFFF, STR_NONE}, // Label Action
{WWT_FRAME, 0, 0, 191, 0, 156, 0xFFFFFFFF, STR_NONE}, // Panel / Background
{WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, // Title
{WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, // Close x button
{WWT_RESIZE, 1, 0, 191, 43, 156, 0xFFFFFFFF, STR_NONE}, // Resize
{WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, // Tab 1
{WWT_TAB, 1, 73, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, // Tab 2
{WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, // Tab 3
{WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, // Tab 4
{WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, // Tab 5
{WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, // Tab 6
{WWT_12, 1, 3, 166, 45, 56, 0xFFFFFFFF, STR_NONE}, // Label Thought marquee
{WWT_VIEWPORT, 1, 3, 166, 57, 143, 0xFFFFFFFF, STR_NONE}, // Viewport
{WWT_12, 1, 3, 166, 144, 154, 0xFFFFFFFF, STR_NONE}, // Label Action
{WWT_FLATBTN, 1, 167, 190, 45, 68, SPR_PICKUP_BTN, STR_PICKUP_TIP}, // Pickup Button
{WWT_FLATBTN, 1, 167, 190, 69, 92, SPR_RENAME, STR_NAME_GUEST_TIP}, // Rename Button
{WWT_FLATBTN, 1, 167, 190, 93, 116, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP}, // Locate Button
{WWT_FLATBTN, 1, 167, 190, 117, 140, SPR_TRACK_PEEP, STR_TOGGLE_GUEST_TRACKING_TIP}, // Track Button
{WWT_FLATBTN, 1, 167, 190, 117, 140, SPR_TRACK_PEEP, STR_TOGGLE_GUEST_TRACKING_TIP}, // Track Button
{ WIDGETS_END },
};
@ -163,7 +163,7 @@ rct_widget window_guest_inventory_widgets[] = {
{WIDGETS_END},
};
//0x981D0C
// 0x981D0C
rct_widget *window_guest_page_widgets[] = {
window_guest_overview_widgets,
window_guest_stats_widgets,
@ -408,7 +408,7 @@ static rct_window_event_list window_guest_inventory_events = {
NULL
};
//0x981D24
// 0x981D24
static rct_window_event_list *window_guest_page_events[] = {
&window_guest_overview_events,
&window_guest_stats_events,
@ -420,7 +420,7 @@ static rct_window_event_list *window_guest_page_events[] = {
void window_guest_set_colours();
//0x981D3C
// 0x981D3C
uint32 window_guest_page_enabled_widgets[] = {
(1 << WIDX_CLOSE) |
(1 << WIDX_TAB_1) |
@ -546,7 +546,7 @@ void window_guest_disable_widgets(rct_window* w){
window_invalidate(w);
}
if (gParkFlags & PARK_FLAGS_NO_MONEY){
disabled_widgets |= (1 << WIDX_TAB_4); //Disable finance tab if no money
disabled_widgets |= (1 << WIDX_TAB_4); // Disable finance tab if no money
}
w->disabled_widgets = disabled_widgets;
}
@ -713,7 +713,7 @@ void window_guest_viewport_init(rct_window* w){
union{
sprite_focus sprite;
coordinate_focus coordinate;
} focus = { 0 }; //The focus will be either a sprite or a coordinate.
} focus = { 0 }; // The focus will be either a sprite or a coordinate.
focus.sprite.sprite_id = w->number;
@ -762,7 +762,7 @@ void window_guest_viewport_init(rct_window* w){
uint16 viewport_flags;
if (w->viewport){
//Check all combos, for now skipping y and rot
// Check all combos, for now skipping y and rot
if (focus.coordinate.x == w->viewport_focus_coordinates.x &&
focus.coordinate.y == w->viewport_focus_coordinates.y &&
focus.coordinate.z == w->viewport_focus_coordinates.z &&
@ -1804,9 +1804,9 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
rct_peep* peep = GET_PEEP(w->number);
//cx
// cx
sint32 x = w->x + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].left + 4;
//dx
// dx
sint32 y = w->y + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].top + 4;
// Cash in pocket

View File

@ -141,7 +141,7 @@ static sint32 _window_guest_list_highlighted_index; // 0x00F1EE10
static sint32 _window_guest_list_selected_tab; // 0x00F1EE12
static sint32 _window_guest_list_selected_filter; // 0x00F1EE06
static sint32 _window_guest_list_selected_page; // 0x00F1EE07
static uint32 _window_guest_list_selected_view; // 0x00F1EE13
static uint32 _window_guest_list_selected_view; // 0x00F1EE13
static sint32 _window_guest_list_num_pages; // 0x00F1EE08
static sint32 _window_guest_list_num_groups; // 0x00F1AF22
static bool _window_guest_list_tracking_only;

View File

@ -305,7 +305,7 @@ uint32 rct_duck::GetFrameImage(sint32 direction) const
uint32 imageId = 0;
if (state < DUCK_MAX_STATES)
{
// TODO check frame is in range
// TODO: Check frame is in range
uint8 imageOffset = DuckAnimations[state][frame];
imageId = SPR_DUCK + (imageOffset * 4) + (direction / 8);
}

View File

@ -26,12 +26,12 @@
#pragma pack(push, 1)
typedef struct rct_banner {
uint8 type;
uint8 flags; //0x01 bit 0 is no entry
rct_string_id string_idx; //0x02
uint8 colour; //0x04
uint8 text_colour; //0x05
uint8 x; //0x06
uint8 y; //0x07
uint8 flags; // 0x01 bit 0 is no entry
rct_string_id string_idx; // 0x02
uint8 colour; // 0x04
uint8 text_colour; // 0x05
uint8 x; // 0x06
uint8 y; // 0x07
} rct_banner;
assert_struct_size(rct_banner, 8);
#pragma pack(pop)

View File

@ -236,7 +236,7 @@ static money32 RideEntranceExitPlace(sint16 x,
uint8 stationNum,
bool isExit)
{
// Remember when in Unknown station num mode rideIndex is unknown and z is set
// Remember when in unknown station num mode rideIndex is unknown and z is set
// When in known station num mode rideIndex is known and z is unknown
money32 cost = 0;

View File

@ -47,7 +47,7 @@ enum {
enum {
FOOTPATH_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE = (1 << 0),
FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE = (1 << 1), //When elevated
FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE = (1 << 1), // When elevated
FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2),
};